File tree Expand file tree Collapse file tree 2 files changed +22
-42
lines changed Expand file tree Collapse file tree 2 files changed +22
-42
lines changed Original file line number Diff line number Diff line change @@ -90,27 +90,17 @@ Create a new file `vue.config.js` in the project directory.
9090```
9191// vue.config.js
9292module.exports = {
93- configureWebpack: {
94- module: {
95- rules: [{
96- test: /\.less$/,
97- use: [{
98- loader: 'style-loader',
99- }, {
100- loader: 'css-loader',
101- }, {
102- loader: 'less-loader',
103- options: {
104- modifyVars: {
105- 'primary-color': '#1DA57A',
106- 'link-color': '#1DA57A',
107- 'border-radius-base': '2px',
108- },
109- javascriptEnabled: true,
110- },
111- }],
112- }],
113- },
93+ css: {
94+ loaderOptions: {
95+ less: {
96+ modifyVars: {
97+ 'primary-color': '#1DA57A',
98+ 'link-color': '#1DA57A',
99+ 'border-radius-base': '2px',
100+ },
101+ javascriptEnabled: true
102+ }
103+ }
114104 }
115105}
116106```
Original file line number Diff line number Diff line change @@ -92,27 +92,17 @@ module.exports = {
9292```
9393// vue.config.js
9494module.exports = {
95- configureWebpack: {
96- module: {
97- rules: [{
98- test: /\.less$/,
99- use: [{
100- loader: 'style-loader',
101- }, {
102- loader: 'css-loader',
103- }, {
104- loader: 'less-loader',
105- options: {
106- modifyVars: {
107- 'primary-color': '#1DA57A',
108- 'link-color': '#1DA57A',
109- 'border-radius-base': '2px',
110- },
111- javascriptEnabled: true,
112- },
113- }],
114- }],
115- },
95+ css: {
96+ loaderOptions: {
97+ less: {
98+ modifyVars: {
99+ 'primary-color': '#1DA57A',
100+ 'link-color': '#1DA57A',
101+ 'border-radius-base': '2px',
102+ },
103+ javascriptEnabled: true
104+ }
105+ }
116106 }
117107}
118108```
You can’t perform that action at this time.
0 commit comments