想在iview中實(shí)現(xiàn)自定義的.less全局樣式設(shè)置,首先我在src創(chuàng)建theme目錄存放less文件,接著在theme下創(chuàng)建index.less,文件具體內(nèi)容:@import '~iview/src/styles/index.less';// Color
@primary-color : #41b883;@info-color : #1d8ce0;@success-color : #41b883;然后在main.js中引入:import './theme/index.less'但是最后run的時(shí)候會(huì)報(bào)錯(cuò)報(bào)錯(cuò)提醒:ERROR Failed to compile with 1 errors 09:08:28
error in ./src/theme/index.less
Module build failed:前提我已經(jīng):1.npm install iview-loader --save-dev2.在webpack.base.conf.js文件中的resolve下的extensions中添加了.less:
extensions: ['.js', '.vue', '.json','.less'],是我方式上存在錯(cuò)誤么,希望可以幫助解決
添加回答
舉報(bào)
0/150
提交
取消