installation and use steps are as follows:
1, install [NPM install less-loader –save]
2. Add
to [rules] in [webpack.base.conf.js] file under [build] file {
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
}
3, write [lang=”less”]
in the “style” tag
4, [NPM run dev] :
error was reported because the version installed by the less-loader was too high. In [package. Json], you can see the installed version
5, the solution: strong> span> uninstall install high version of the less – loader, the NPM uninstall less – loader 】, installation specified low version of the less – loader (NPM install [email protected] – save 】 can solve the error.
Read More:
- Using webpack to report typeerror: this.getresolve is not a function
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.
- TypeError: this.getOptions is not a function
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
- Vue report failed to mount component: template or render function not defined
- Module not found: Error: Can’t resolve ‘sass-loader’ in ‘F:\H5\project-h5’
- Module build failed: error: cannot find module ‘node sass’ error
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- Module build failed: SyntaxError: Unexpected token
- Use mini-css-extract-plugin to report ReferenceError: window is not defined
- Does Vue project already have sass loader dependency or report an error using lang = “SCSS”
- Vue Error in v-on handler: “TypeError: path.indexOf is not a function“
- Vue error in mounted hook: “typeerror: object (…) is not a function“
- Module build failed: Error: ENOENT: no such file or directory, scandir,‘node_modules\node-sass\vend’
- Solve the problem that the version of less is too high
- Module build failed (from ./node_modules/postcss-loader/src/index.js):
- Vue project error: uncaught typeerror: vuex__ WEBPACK_ IMPORTED_ MODULE_ 1__ . default.store is not a constructor
- About iView reporting error in Vue project: error in mounted hook: “typeerror: this$ parent.updateNav is not a function”