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

[Bug Report][3.7.2] [email protected] Legacy API deprecation warnings #20489

Closed
jakubmatisak opened this issue Sep 18, 2024 · 5 comments
Closed
Labels
S: triage upstream Problem with a third party library that we may have to work around

Comments

@jakubmatisak
Copy link

Environment

Vuetify Version: 3.7.2
Vue Version: 3.5.6
Browsers: Chrome 128.0.0.0
OS: Windows 10

Steps to reproduce

After upgrading sass to 1.79.1 in my project there are many warnings.
"Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0."

In version 1.79.0 was this warning message added by sass team. In reproduction link are included release notes.

Expected Behavior

Change Legacy API

Actual Behavior

Warnings everywhere :)

Reproduction Link

https://github.com/sass/dart-sass/blob/main/CHANGELOG.md

@userquin
Copy link
Member

If you're using Vite in your application try replacing sass (legacy) with sass-embedded (modern): https://vuetifyjs.com/en/features/sass-variables/#build-performance

@KaelWD
Copy link
Member

KaelWD commented Sep 19, 2024

This is the responsibility of whatever bundler you're using, not vuetify.

@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
@KaelWD KaelWD added the upstream Problem with a third party library that we may have to work around label Sep 19, 2024
@weicheng000
Copy link

weicheng000 commented Sep 20, 2024

...
import * as sass from "sass";

export default defineConfig({
...
css :{
    preprocessorOptions : {
      scss: {
        api: "modern",
        importers: [
          new sass.NodePackageImporter()
        ]
      },
      sass: {
        api: "modern",
        importers: [
          new sass.NodePackageImporter()
        ]
      },
    }
  },
...
})

Maybe can help you, if you are using vite.

@jakubmatisak
Copy link
Author

jakubmatisak commented Sep 20, 2024

Thank you all for help. I will replace sass with sass-modern. My bad.

@jakubmatisak
Copy link
Author

jakubmatisak commented Sep 20, 2024

If this would help anyone with the same problem in future:

  1. I have changed dependency from sass to sass-embedded.
  2. I have addded:
    css: {
        preprocessorOptions : {
            scss: {
                api: "modern-compiler",
            },
        }
    },

to vite.config.mjs

After these changes everything works fine.
Thank everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: triage upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

No branches or pull requests

4 participants