Rollup support for modular-css
.
$ npm i modular-css-rollup
Due to API changes, certain major versions of this plugin will require a specific minimum rollup version.
modular-css-rollup@11
requires rollup@0.60.0
modular-css-rollup@15
requires rollup@0.65.0
Config fileconst bundle = await rollup({
    input   : "./index.js",
    plugins : [
        require("modular-css-rollup")()
    ]
});
Optionsimport css from "modular-css-rollup";
Â
export default {
    input   : "./index.js",
    output  : {
        dest    : "./gen/bundle.js",
        format  : "umd"
    },
    plugins : [
        css()
    ]
};
common
File name to use in case there are any CSS dependencies that appear in multiple bundles. Defaults to "common.css".
include
/exclude
A minimatch pattern, or an array of minimatch patterns, relative to process.cwd()
. include
defaults to **/*.css
.
json
Boolean/String to determine if JSON files containing all exported classes & values should be output. If set to true
will write out to a file named exports.json
. If a String
will write out to that file name. Defaults to false
.
map
Boolean to determine if inline source maps should be included. Defaults to true
.
To force the creation of external source maps set the value to { inline : false }
.
namedExports
By default this plugin will create both a default export and named export
s for each class in a CSS file. You can disable this by setting namedExports
to false
.
styleExport
By default this plugin will extract and bundle CSS in a separate file. If you would like the styles from each imported CSS file to be exported as a string for use in JS, you can enable this by setting styleExport
to true
. If you are using this option the after
& done
hooks will not run against the exported styles, you should perform any additional CSS transformations in the processing
hook instead.
import { styles } from "./styles.css";
Enable styleExport
will also disable the plugin from emitting any assets as well as sourcemaps (unless you explicitly opt-in to sourcemaps via the map
option)
All other options are passed to the underlying Processor
instance, see Options.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4