1.0.7 • Published 3 years ago

umi-plugin-fire v1.0.7

Weekly downloads
11
License
MIT
Repository
gitlab
Last release
3 years ago

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

nametype
apiKeystring (required in production)
authDomainstring (optional)
databaseURLstring (optional)
projectIdstring (optional)
storageBucketstring (optional)
messagingSenderIdstring (optional)
featuresarray (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();
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago