Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新安装报错,样式报错问题 #519

Open
manager668899 opened this issue Nov 19, 2024 · 2 comments
Open

新安装报错,样式报错问题 #519

manager668899 opened this issue Nov 19, 2024 · 2 comments

Comments

@manager668899
Copy link

image

More info and automated migrator: https://sass-lang.com/d/import


1 │ @import "@/styles/var.scss";
│ ^^^^^^^^^^^^^^^^^^^

src/layouts/components/Tabs/components/MoreButton.vue 1:9 root stylesheet

Deprecation Warning: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "../index.scss";
│ ^^^^^^^^^^^^^^^

src/layouts/components/Tabs/components/MoreButton.vue 2:9 root stylesheet

@manager668899
Copy link
Author

sass 1.80 不再支持 @import 需要使用 `@use’ 例如@use "@/variables.scss";

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api

修改方法 vue.config.js:
export default defineConfig({
...
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler', // 修改api调用方式
},
},
},
...
});

@yuelaotou
Copy link

api: 'modern-compiler', // 修改api调用方式

这也不生效呢。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants