Use less
Download dependency
npm install -D less less-loader
Add in main.js
import less from 'less'; Vue.use(less);
use
<style lang="less"></style>
Operation error
Reason: the version of less loader installed is too high
Solution: reinstall the lower version of
npm uninstall less-loader npm install [email protected]
Using sass
Download dependency
npm install -D node-sass sass-loader style-loader
use
<style lang="scss" scoped></style>
Operation error
Cause: sass loader version is too high
Solution: reinstall the lower version of
npm uninstall sass-loader npm install [email protected]
Similar Posts:
- Module build failed: TypeError: this.getResolve is not a function at Object.loader node-sass Install Error
- Mac uniapp Compile Error: sass-loader [How to Solve]
- NPM run dev Error: this.getOptions is not a funtion
- [Solved] Error:Node Sass version 6.0.0 is incompatible with ^4.0.0
- [Solved] NPM Error: gyp verb which failed Error:not found: python2
- [Solved] Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Vue installs less Error: Failed to compile with 1 errors
- [Solved] Module build failed: from ./node_modules/mini-css-extract-plugin/dist/loader.js
- Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Syntax Error: SassError: semicolons aren’t allowed in the indented syntax.