egoist / egoist/rollup-plugin-postcss
Not working with scss modules including inline comments
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
```
module.exports = [
{
input: "components/Button",
output: {
file: "dist/components/Button.js",
format: "es"
},
plugins: [
peerDepsExternal(),
postcss({
extract: false,
modules: true,
autoModules: true,
use: ["sass"],
parser: "postcss-scss",
}),
babel({ babelHelpers: "runtime", exclude: "node_modules/**" }),
resolve({ extensions: [".js", ".jsx", ".scss"] }),
commonjs(),
],
external: [/@babel\/runtime/]
}
];
```
This throws an error
```
CssSyntaxError: .module.scss:3:1: Unexpected '/'. Escaping special characters with \ may help.
```
caused by `postcss-modules-local-by-default`.
The error suggests the problem is inline comment which I have in line 3, and indeed - if I remove it starts working, however I don't see it as a fix. Inline comment is valid scss syntax.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.