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]: quietDeps option for dart-sass isn't recognised #1423

Open
Radiergummi opened this issue Jun 22, 2024 · 1 comment
Open

[Bug Report]: quietDeps option for dart-sass isn't recognised #1423

Radiergummi opened this issue Jun 22, 2024 · 1 comment
Milestone

Comments

@Radiergummi
Copy link

Steps to reproduce

I'm trying to migrate an application from Vite to Farm. The project uses Vuetify 2, which relies heavily on deprecated implicit divisions; as Vuetify 2 is deprecated by now, there isn't much I can do about it (safe migrating to v3, which is underway, but lots of work).
This causes dart-sass to emit hundreds of deprecation warnings like this during the build:

   ╷
58 │ $container-padding-x: $grid-gutter / 2 !default;
   │                       ^^^^^^^^^^^^^^^^
   ╵
    node_modules/vuetify/src/styles/settings/_variables.scss 58:23     @import
    node_modules/vuetify/src/styles/settings/_index.sass 1:9           @import
    node_modules/vuetify/src/styles/styles.sass 2:9                    @import
    node_modules/vuetify/src/components/VSnackbar/_variables.scss 1:9  @import
    node_modules/vuetify/src/components/VSnackbar/VSnackbar.sass 1:9   root stylesheet

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($grid-gutter, 12) or calc($grid-gutter / 12)

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

Now, as that sass-lang page mentions, there's the setting quietDeps to silence these warnings. Alas, this doesn't seem to work for Farm when configured as documented:

plugins: [
    [ '@farmfe/plugin-sass', { quietDeps: true, verbose: false } ],
],

I verified that options are passed by setting alertColor: true, which as expected made the deprecation warnings monochrome. I can't get it to omit the deprecations, though.

To reproduce:

  1. Import a sass stylesheet that uses implicit divisions, or produce another deprecation (5 / 2)
  2. Configure plugin-sass to silence deprecations (quietDeps: true)
  3. Build the application

Reproduce link

No response

What is actually happening?

Deprecations are logged.

System Info

System:
    OS: macOS 14.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 668.66 MB / 16.00 GB
    Shell: 3.7.1 - /usr/local/bin/fish
  Binaries:
    node: v22.2.0
    npm: 10.7.0
  Browsers:
    Chrome: 126.0.6478.114
    Safari: 17.5
  npmPackages:
    @farmfe/core: ^1.1.13 => 1.2.0
@wre232114
Copy link
Member

Rust sass plugin may not support all the sass options. You can try js-sass-plugin instead https://www.farmfe.org/docs/plugins/official-plugins/js-sass

@wre232114 wre232114 added this to the Planned milestone Jun 25, 2024
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