Skip to content

Commit 4bb9e75

Browse files
BuonOmotangjinzhou
authored andcommitted
Change vue cli 3 way of doing things (#264)
1 parent 1542d11 commit 4bb9e75

File tree

2 files changed

+22
-42
lines changed

2 files changed

+22
-42
lines changed

docs/vue/customize-theme.en-US.md

+11-21
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,17 @@ Create a new file `vue.config.js` in the project directory.
9090
```
9191
// vue.config.js
9292
module.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
```

docs/vue/customize-theme.zh-CN.md

+11-21
Original file line numberDiff line numberDiff line change
@@ -92,27 +92,17 @@ module.exports = {
9292
```
9393
// vue.config.js
9494
module.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
```

0 commit comments

Comments
 (0)