🍣 A Rollup plugin that bundles imported css.
This is a fork of the rollup-plugin-css-only
package.
Please refer to the original README for further information.
Create a rollup.config.js
configuration file and
import the plugin:
import { css } from "https://deno.land/x/[email protected]+0.20.0/plugins/css/mod.ts";
export default {
input: "./src/mod.ts",
output: {
dir: "./dist",
format: "es" as const,
},
plugins: [css()],
};
Then call rollup
either via the
CLI or the
API.
Type: String
| String[]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.
Type: String
| String[]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Type: String
| Function
| Boolean
Default: null
One of:
- A string filename to write all styles to;
- A callback that will be called once generated with three arguments:
styles
: the contents of all style tags combined:"body { color: green }"
;styleNodes
: an array of style objects:[{ lang: "css", content: "body { color: green }" }]
;bundle
: the output bundle object;
false
to disable any style output or callbacks;null
for the default behaviour: to write all styles to the bundle destination where .js is replaced by .css.