Browserify transform to automatically inject the scoped css from scope-styles into the page
browserify -t [ scope-styles-extractify --runtime=true ] main.js
var browserify = require('browserify');
var extractify = require('scoped-styles-extractify');
var b = browserify('./main.js');
b.transform(extractify, {runtime: false});
b.bundle();
- runtime Boolean, default is
false
- Whether scope-styles should evaluate style objects at runtime (in browser) or at buildtime.
- If
false
, the style object is evaluated at buildtime and the code to inject the css is inlined. - If
true
, scope-styles is merely replaced with scope-styles-inject.