Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
web-framework-temp
/
vue-cli3-vt-template-master
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ef049ff0
authored
2022-02-16 17:56:14 +0800
by
chenyunhao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复打包编译CSS文件重复问题
1 parent
5ede2eda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
vue.config.js
vue.config.js
View file @
ef049ff
...
...
@@ -54,6 +54,11 @@ module.exports = {
}
})
config
.
plugin
(
'extract-css'
).
tap
(()
=>
[{
filename
:
`static/css/[name].
${
Timestamp
}
.css`
,
chunkFilename
:
`static/css/[name].
${
Timestamp
}
.css`
}])
},
configureWebpack
:
{
// webpack 配置
// 修改打包后js文件名
...
...
@@ -62,12 +67,12 @@ module.exports = {
chunkFilename
:
`static/js/[name].
${
Timestamp
}
.js`
},
// 修改打包后css文件名
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
`static/css/[name].
${
Timestamp
}
.css`
,
chunkFilename
:
`static/css/[name].
${
Timestamp
}
.css`
})
]
//
plugins: [
//
new MiniCssExtractPlugin({
//
filename: `static/css/[name].${Timestamp}.css`,
//
chunkFilename: `static/css/[name].${Timestamp}.css`
//
})
//
]
},
// 修改打包后img文件名
// chainWebpack: config => {
...
...
Please
register
or
sign in
to post a comment