razzle-plugin-firebase
v1.3.0
Published
Razzle plugin for firebase configuration
Readme
razzle-plugin-firebase
A Razzle plugin for seting up firebase (with local emulation!)
See example for an example!
Usage
Install the plugin:
# using npm
npm install --dev razzle-plugin-firebase
# yarn
npm add --dev razzle-plugin-firebaseAdd configuration to razzle.config.js:
// razzle.config.js file
module.exports = {
plugins: [
'firebase'
],
};Configuration
The plugin allows the following option keys:
pkg: Project'spackage.jsonfile (default:package.json)firebase: Project'sfirebase.jsonfile (default:firebase.json)target: In the casehostingson the firebase file is an array, the hosting target valueexec: Useexecinstead ofspawn(default:false)start: Firebase command to run in order to start emulators, if necessary an array can be passed to set additional arguments, eg:['emulators:start', '--only', 'hosting,functions,firestore'](default:emulators:start)serverIndex: Server output filename (default:index.js)
// razzle.config.js file
module.exports = {
plugins: [
{
name: 'firebase',
options: {
target: 'app',
start: 'serve',
},
}
],
};