一覧へ戻る
naecoo/rollup-plugin-css2(新しいタブで開きます)
主要言語: JavaScript
Rollup plugin for CSS file
- star 数
- 3
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 0
- 最終更新
- 2022/01/21
主要言語: JavaScript
Rollup plugin for CSS file
Rollup plugin for CSS file.
npm add rollup-plugin-css2 --save-dev
// rollup.config.js import css from 'rollup-plugin-css2'; export default { // ... other option plugins: [ css({ output: 'output.css' }) ] };
The configuration above will pack all CSS file and generate output.css
Type: String | Function
if output is string, it represents the CSS file name.
if output is function, it will be called during the Rollup generate hook.
{ output(bundleCss, styles) { // first argument is CSS source code. // second argument is a Map object. The file name is used as `key`, and the corresponding css code is used as `value` } }
Type: Array
default: ['**/*.css']
Filters files that do not match Glob expressions. By default all CSS files are matched.
Type: Array
default: []
Filters files that do match the exclude Glob expressions.
Type: Object
default:
{ // Whether to enable minification minify: false, // The browser targets for the generated code targets: {}, // Whether to enable various draft syntax drafts: { nesting: false } };
This plugin using @parcel-css as CSS parser. We can change the parser's options, but only three options are currently supported, with more to come.
Check out more details in @parcel-css docs
@parcel-css option