-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
I'd like to preprocess CSS with rollup + this plugin with no javascript involved (SASS in, CSS out).
{
input: 'css/index.css',
output: {
file: "foo.css",
},
plugins: [
styles({
include: [/\.css/u],
use: ['sass'],
mode: ["emit"],
minimize: {preset: 'default'},
})
]
}I tried any possible option to entirely disable output postprocessing:
sourcemap: false,
compact: false,
esModule: false,
minifyInternalExports: false,
generatedCode: e => e,
plugins: []but I can't get the CSS to be stored because rollup does tryParse :
css/index.css → foo.css...
css/index.css (1:80)
[!] RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
html{-webkit-tex...
*/
I tried to add a dummy plugin to disable this:
```js
{
transform(code, _id) {
return {ast: code, code, map: null, moduleSideEffects: false};
}
}
but still doesn't keep rollup this.hasEffects(createHasEffectsContext())); from running and triggering an error.
How to achieve this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels