-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0 #7771
Comments
same stuff mate |
same here |
1 similar comment
same here |
I know this comment is getting downvoted, but I found this github thread while trying to migrate from Change this: @import 'stylesheet.scss' to this: @use 'stylesheet.scss' as *;
// or `@use 'stylesheet.scss' as stylesheet;`
// which can then be used like `font-size: stylesheet.$font-size;` |
same here |
@knakamura13 , I changed it, but the warnings are still displayed in the console Upd, works for me: export default defineConfig({
plugins: [react()],
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
}) After that, I changed all |
What are my options if I've got (S)CSS rules/properties in the files I want to import globally as well, and not just "variables, mixins, and functions". |
Watch message in console! $ npm install -g sass-migrator ($ sass-migrator module --migrate-deps <path/to/style.scss>) I done it - and it works! |
After changing to @use it shows a Deprecation Warning |
Yes, I got too! U must change your js-files. |
While it's necessary for everyone to update their own stylesheets to use |
sass used to be the best part of my job. |
So no way to use global variables now without having to import them in each and every scss component? |
I found a possible solution to this problem using sass (scss) and webpack (not sure if this is a good way to solve it): module.exports = {
// ...
module: {
// ...
rules: [
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
additionalData: `@use 'pathToFile.scss' as *;`,
},
},
],
},
],
},
}; And in this file we need to import other files using @forward: @forward 'pathToAnotherFile.scss'; So now we can use our variables in the app: .header{
color: $primary;
} |
Downgrading sass to ~1.32.0 helped me. |
this one is helpful |
agree w/ @martinille , best option is to downgrade, after a bunch of digging the such a shame to break an entire workflow, they should just keep both options as there are pros and cons to each |
I use ~1.77.5 helped me. |
VUE CLI 3, BOOTSTRAP 5.3.3 Y SASS 1.77.5 me funciona perfecto...
|
Downgrade. |
this is why web development sucks |
SASS should be renamed SUS |
thanks, u save my life |
Dowgrading to |
How long will downgrading be the official solution? |
Ran into this here: palantir/blueprint#7251 library doesn't have a long term plan, one of those things where people depend on the api in ways you don't want perhaps I also downgraded to |
I also downgraded to ~1.77.6 |
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/devbox/zf6kxq
Bug description
Deprecation Warning on line 13, column 9 of node_modules/swiper/swiper.scss:
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
Expected Behavior
Compatibility with Dart Sass 3.0.0.
Actual Behavior
No response
Swiper version
11.1.14
Platform/Target and Browser Versions
Dart Sass 3.0
Validations
Would you like to open a PR for this bug?
You can check PR here: #7772
The text was updated successfully, but these errors were encountered: