thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
134 stars 47 forks source link

CSS file not generated when input is empty but when CSS should still be generated due to `prefix` being set #97

Open kruncher opened 1 year ago

kruncher commented 1 year ago

If SCSS source file is empty and prefix is set then the CSS file should still be generated:

const scssConfig = {
  processor: () => postcss(postCssConfig),

  output: "./static-dev/css/main.css",
  outputStyle: "compressed",
  sourceMap: isPreview,
  failOnError: true,

  prefix: `@import "./frontend/styles/base.scss";`,

  includePaths: [
    "./node_modules/prismjs/themes",
  ],
};
thgh commented 1 year ago

It probably makes sense to always generate the CSS file for repeatability purposes. Could you make a PR?