In order to use this module,
you need to be able to execute "firebase setup:web
" in the target project.
npm install --save-dev firebase-setup-web
# or
yarn add -D firebase-setup-web
const config = require('firebase-setup-web');
const defParams = {
'process.env.FB_PROJECT_ID': JSON.stringify(config.projectId),
}
// webpack config
module.exports = {
plugins: [
new webpack.DefinePlugin(defParam),
],
};
If you want to get config using token,
please set a token to environment valiable FB_CI_TOKEN
.
export FB_CI_TOKEN="Set Here"
interface Config {
apiKey: string;
databaseURL: string;
storageBucket: string;
authDomain: string;
messagingSenderId: string;
projectId: string;
}
MIT