egoist / egoist/rollup-plugin-postcss

Not working with scss modules including inline comments

Open
#436 1 comment 3 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.