remote-styles
Load CSS from Firebase Remote Config
Install
npm i remote-styles firebase# OR yarn add remote-styles firebase
Basic Example
Webpack/Module Bundler usage
; importStyles;
Script Tags / Loader Version
remote-styles
has a sub-package that lazy loads Firebase. This is useful for sites that use script tags instad of module bundling.
This can be configured remotely!
Upload/Download CSS from Remote Config via the CLI
To use the CLI you'll need to download a Service Account from the Firebase Console.
Downloading CSS
node_modules/.bin/remote-styles get --key="CSS" --sa="./sa.json" --out="styles.css"
Uploading CSS
node_modules/.bin/remote-styles put --key="CSS" --sa="./sa.json" styles.css