Anidetrix / rollup-plugin-styles

🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
https://anidetrix.github.io/rollup-plugin-styles
MIT License
242 stars 43 forks source link

@import css file is Unresolved #194

Open jerryYuX opened 2 years ago

jerryYuX commented 2 years ago

index.less

@import '~xxx/xxx/lib/xxx.css';
.root {
  ···
}

the log is

Unresolved `@import` in `@import '~xxx/xxx/lib/xxx.css'`

but @import less file is OK, for example:

@import '~xxx/xxx/lib/xxx.less`;
.root {
  ···
}

the css file and less file both on the right path

the plugin config is:

{
        mode: 'emit',
        use: ['less'],
        url: false,
        less: {
          javascriptEnabled: true,
          modifyVars:  {},
        },
}