Skip to content

Commit 4429a93

Browse files
committed
refactor(svg): 打包构建时,exclude src/icons
1 parent b706a7b commit 4429a93

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/layout/components/Navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{{ $t('navbar.dashboard') }}
3131
</el-dropdown-item>
3232
</router-link>
33-
<a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">
33+
<a target="_blank" href="https://github.com/cklwblove/vue-element-admin-ts/">
3434
<el-dropdown-item>
3535
{{ $t('navbar.github') }}
3636
</el-dropdown-item>

vue.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,17 @@ module.exports = {
206206
// module
207207

208208
// style-resources-loader
209-
// const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
210-
// types.forEach((type) =>
211-
// addStyleResource(config.module.rule('less').oneOf(type))
212-
// );
209+
const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];
210+
types.forEach((type) =>
211+
addStyleResource(config.module.rule('less').oneOf(type))
212+
);
213+
214+
// svg
215+
// exclude icons
216+
config.module
217+
.rule('svg')
218+
.exclude.add(resolve('src/icons'))
219+
.end();
213220

214221
config
215222
.when(process.env.NODE_ENV === 'development',

0 commit comments

Comments
 (0)