Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

397
Views
How implement sass:math into vue.config.js

I am using vue-cli - Vue on v2.6; sass v1.49 - and using simple division calculations, but I follow receiving errors in the console:

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

I tried some documentations ('webpack-contrib::implementation'; 'dev.to::how to use dart-sass with vue'), which asks you to configure vue.config.js like this:

module.exports = {
  css: {
    loaderOptions: {
      scss: {
        implementation: require("sass"),
      },
    },
  },
};

But without success:

Syntax Error: ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.

  • options.implementation should be an object: object { … } -> The implementation of the sass to be used (https://github.com/webpack-contrib/sass-loader#implementation).

So how do I implement the use of sass: Math in Vue-cli?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After some time trying some solutions, the easiest has been implemented like this:

module.exports = {
  css: {
    loaderOptions: {
      scss: {
        prependData: '@use "sass:math";',
      },
    },
  },
};

As I use a global variable file, the final setup was like this:

module.exports = {
  css: {
    loaderOptions: {
      scss: {
        prependData: `
          @use "sass:math";
          @import "~@/assets/scss/src/_variables.scss";
        `,
      },
    },
  },
};
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!