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 · 6 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",
            },
        }
    },

to vite.config.mjs

After these changes everything works fine.
Thanks everyone.

Edit November 2: We have changed modern-compiler to modern, because npm run build could not end when build was executed more than once.

@MetRonnie
Copy link
Contributor

MetRonnie commented Nov 4, 2024

I was confused why this was closed as not planned when there were deprecated calls in the vuetify SCSS files, e.g.:

Deprecation Warning: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use map.get instead.

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

   ╷
48 │     'lighten-5': map-get($shades, 'black'),
   │                  ^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    ..\..\..\vuetify\lib\styles\settings\_colors.scss 48:18  @forward

Looks like these have been updated in the latest release though (3.7.3): 2b22da1

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

5 participants