修复打包编译CSS文件重复问题
Showing
1 changed file
with
11 additions
and
6 deletions
... | @@ -54,6 +54,11 @@ module.exports = { | ... | @@ -54,6 +54,11 @@ module.exports = { |
54 | } | 54 | } |
55 | }) | 55 | }) |
56 | 56 | ||
57 | config.plugin('extract-css').tap(() => [{ | ||
58 | filename: `static/css/[name].${Timestamp}.css`, | ||
59 | chunkFilename: `static/css/[name].${Timestamp}.css` | ||
60 | }]) | ||
61 | |||
57 | }, | 62 | }, |
58 | configureWebpack: { // webpack 配置 | 63 | configureWebpack: { // webpack 配置 |
59 | // 修改打包后js文件名 | 64 | // 修改打包后js文件名 |
... | @@ -62,12 +67,12 @@ module.exports = { | ... | @@ -62,12 +67,12 @@ module.exports = { |
62 | chunkFilename: `static/js/[name].${Timestamp}.js` | 67 | chunkFilename: `static/js/[name].${Timestamp}.js` |
63 | }, | 68 | }, |
64 | // 修改打包后css文件名 | 69 | // 修改打包后css文件名 |
65 | plugins: [ | 70 | // plugins: [ |
66 | new MiniCssExtractPlugin({ | 71 | // new MiniCssExtractPlugin({ |
67 | filename: `static/css/[name].${Timestamp}.css`, | 72 | // filename: `static/css/[name].${Timestamp}.css`, |
68 | chunkFilename: `static/css/[name].${Timestamp}.css` | 73 | // chunkFilename: `static/css/[name].${Timestamp}.css` |
69 | }) | 74 | // }) |
70 | ] | 75 | // ] |
71 | }, | 76 | }, |
72 | // 修改打包后img文件名 | 77 | // 修改打包后img文件名 |
73 | // chainWebpack: config => { | 78 | // chainWebpack: config => { | ... | ... |
-
Please register or sign in to post a comment