umi-plugin-fire

1.0.7 • Public • Published

umi-plugin-fire

NPM version

Umi plugin for firebase.

Install

Add to package.json

"umi-plugin-fire": "^1.0.7",

Use

Just setup the plugin on .umirc.js or in config.js

export default {
  plugins: {
    // ...
    firebase: {
      apiKey: '',
      authDomain: '',
      projectId: '',
      storageBucket: '',
      messagingSenderId: '',
      appId: '',
      measurementId: '',
      features: [],
    },
    // ...
  },
};

Options

name type
apiKey string (required in production)
authDomain string (optional)
databaseURL string (optional)
projectId string (optional)
storageBucket string (optional)
messagingSenderId string (optional)
features array (optional)
analytics | auth | firestore | functions | messaging | storage | performance | database | remote-config

How to use

After you configure the plugin, you are able to use firebase app as usual. But this time you don't need to initializeApp your app:

import app from 'firebase/app';

analytics = app.analytics();

Package Sidebar

Install

npm i umi-plugin-fire

Weekly Downloads

8

Version

1.0.7

License

MIT

Unpacked Size

5.56 kB

Total Files

3

Last publish

Collaborators

  • belis
  • rubenmf-dev