Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Dart SASS Warnings Produced By External Theme File

I have a third party SCSS file that I am including in my project, and Dart SASS is displaying a long list of warnings as a result. How can I disable the warnings for third party includes?

I'm using Vue with Dart SCSS. Dart has a quietDeps option, but I'm not sure if I'm using it the right way.

// _common.scss
// Line below causes warnings to be displayed.
@import "~@progress/kendo-theme-default/dist/all";
// ...
// Vue.config.js
module.exports = {
  // ...
  css: {
    loaderOptions: {
      sass: {
        prependData: '@import "~@/styles/common";',
        sassOptions: {
          quietDeps: true
        }
      }
    }
  }
}
like image 451
Alex Wade Avatar asked Jun 02 '21 20:06

Alex Wade


2 Answers

For NuxtJS add this to nuxt.config.js

  build: {
    loaders: {
      scss: {
        sassOptions: {
          quietDeps: true
        }
      }
    }
  }
like image 50
ihorbond Avatar answered Sep 26 '22 00:09

ihorbond


For anyone who looking for Encore configuration

Encore.enableSassLoader((options) => {
  options.sassOptions = {
    quietDeps: true, // disable warning msg
  }
})
like image 43
anhnt Avatar answered Sep 26 '22 00:09

anhnt