if you want to implement custom .less global styling in iview, first I create a theme directory in src to store less files, and then create index.less, files under theme:
@import "~iview/src/styles/index.less";
// Color
@primary-color : -sharp41b883;
@info-color : -sharp1d8ce0;
@success-color : -sharp41b883;
main.js:
import "./theme/index.less"
but in the end, an error will be reported in run
error reminder:
ERROR Failed to compile with 1 errors 09:08:28
error in ./src/theme/index.less
Module build failed:
premise that I have:
1.npm install iview-loader --save-dev
2.webpack.base.conf.jsresolveextensions.less:
extensions: [".js", ".vue", ".json",".less"],
is there a mistake in my way? I hope it can help solve
.