You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, in the cmd run window, there is still the following prompt
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
╷
3 │ ;@import "sass-embedded-legacy-load-done:2";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
file:///F:/xxx/vite-project/src/assets/style/vars.scss 3:10 @import
file:///F:/xxx/vite-project/src/assets/style/base.scss 1:9 root stylesheet
Hint this, that is, developers do not use @import, use @use, can use @use and report errors, this is not a dead circle, it is really very confused, what the official is doing, since the @import alternative has not come out, do not prompt
The text was updated successfully, but these errors were encountered:
@use isn't a drop-in replacement with exactly the same semantics as @import. You'll need to read the documentation to learn to use it. In this case, there are two issues:
If you write @use 'vars' without an explicit namespace or lack thereof, the variables will be available in the namespace vars, as in vars.$color.
In the new module system, members whose names begin with - (or equivalently _) are considered private and aren't accessible outside the file they're defined in. You'll need to rename $--color if you want to share it across files.
However, in the cmd run window, there is still the following prompt
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
╷
3 │ ;@import "sass-embedded-legacy-load-done:2";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
file:///F:/xxx/vite-project/src/assets/style/vars.scss 3:10 @import
file:///F:/xxx/vite-project/src/assets/style/base.scss 1:9 root stylesheet
i created a vite+vue3+ts project with the
npm create vite@latest
command and installed the scss dependency with thenpm i -D sass
commandThe project environment is as follows:
The project structure is as follows:
The main file code is as follows
Start the project, the error is as follows:
src/assets/style/base.scss
document to this code, the above problem is solved, the project can be runHowever, in the cmd run window, there is still the following prompt
Hint this, that is, developers do not use @import, use @use, can use @use and report errors, this is not a dead circle, it is really very confused, what the official is doing, since the @import alternative has not come out, do not prompt
The text was updated successfully, but these errors were encountered: