razzle-plugin-firebase
v1.3.0
Published
Razzle plugin for firebase configuration
Downloads
0
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-firebase
Add configuration to razzle.config.js
:
// razzle.config.js file
module.exports = {
plugins: [
'firebase'
],
};
Configuration
The plugin allows the following option keys:
pkg
: Project'spackage.json
file (default:package.json
)firebase
: Project'sfirebase.json
file (default:firebase.json
)target
: In the casehostings
on the firebase file is an array, the hosting target valueexec
: Useexec
instead 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',
},
}
],
};