umi-plugin-firebase

umi plugin for firebase

Usage no npm install needed!

<script type="module">
  import umiPluginFirebase from 'https://cdn.skypack.dev/umi-plugin-firebase';
</script>

README

umi-plugin-firebase

NPM version

Umi plugin for firebase.

Install

yarn add --dev umi-plugin-firebase # OR npm install --save-dev umi-plugin-firebase

Use

Just setup the plugin on .umirc.js

export default {
  plugins: [
    // ...
    ['umi-plugin-firebase', {
      apiKey: '',
      authDomain: '',
      databaseURL: '',
      projectId: '',
      storageBucket: '',
      messagingSenderId: '',
    }],
    // ...
  ],
}

Options

name type default
apiKey string (required in production) process.env.FIREBASE_API_KEY
authDomain string (optional) process.env.FIREBASE_AUTH_DOMAIN
databaseURL string (optional) process.env.FIREBASE_DATABASE_URL
projectId string (optional) process.env.FIREBASE_PROJECT_ID
storageBucket string (optional) process.env.FIREBASE_STORAGE_BUCKET
messagingSenderId string (optional) process.env.FIREBASE_MESSAGING_SENDER_ID