egoist / egoist/rollup-plugin-postcss
Is there a way to support "@use" from sass?
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
I know sass is currently using dart-sass which supports "@use": https://sass-lang.com/documentation/at-rules/use
Here is my rollup configuration:
```js
postcss({
plugins: [autoprefixer()],
extract: false,
modules: true,
use: ["sass"]
})
```
But if I use this in the `scss` file
```css
@use "./vars.module";
.header {
height: vars.$size-base;
}
```
I got `(plugin postcss) Error: Invalid CSS after " height: vars": expected expression (e.g. 1px, bold), was ".$size-base;"`
It does work perfectly using `@import` but it will be [deprecated](https://github.com/sass/sass/blob/master/accepted/module-system.md#timeline)
```css
@import "./vars.module";
.header {
height: $size-base;
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.