Skip to content

Commit

Permalink
[fix] 修复打包后资源重复的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZreXoc authored Mar 12, 2022
1 parent 79b9414 commit d8e1775
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {
output: {
path: resolve('dist'),
filename: 'js/[name].[chunkhash].js',
assetModuleFilename: 'assets/[path]/[name][ext]',
assetModuleFilename: 'assets/packed/[name].[contenthash:4][ext]',
},
resolve: {
alias: {
Expand All @@ -90,10 +90,6 @@ module.exports = {
from: resolve('assets'),
to: 'assets/[path][name][ext]',
},
{
from: resolve('src/whilePlaying/assets'),
to: 'whilePlaying/assets/[path][name][ext]',
},
],
}),
],
Expand All @@ -113,7 +109,7 @@ module.exports = {
{
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
name: 'assets/packed/[name].[contenthash:4].[ext]',
esModule: false,
},
},
Expand Down

0 comments on commit d8e1775

Please sign in to comment.