|
@@ -15,6 +15,7 @@ function resolve(dir) {
|
|
|
module.exports = {
|
|
|
publicPath: process.env.NODE_ENV === 'sit' ? '/sc-operation' : '/',
|
|
|
productionSourceMap: false,
|
|
|
+ filenameHashing: false,
|
|
|
chainWebpack: config => {
|
|
|
// 配置别名
|
|
|
config.resolve.alias
|
|
@@ -33,8 +34,8 @@ module.exports = {
|
|
|
viewportWidth: 1920,//传参
|
|
|
})
|
|
|
// 配置每次打包浏览器缓存文件名的随机性
|
|
|
- // const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
|
|
|
- // config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename)
|
|
|
+ const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
|
|
|
+ config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename)
|
|
|
},
|
|
|
// 配置全局样式变量
|
|
|
css: {
|
|
@@ -57,6 +58,10 @@ module.exports = {
|
|
|
// resources: path.relative(__dirname, '../src/assets/css/punlic-style.scss')
|
|
|
// }
|
|
|
// })
|
|
|
+ },
|
|
|
+ extract: { // 打包后css文件名称添加时间戳
|
|
|
+ filename: `css/[name].${new Date().getTime()}.css`,
|
|
|
+ chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`,
|
|
|
}
|
|
|
},
|
|
|
configureWebpack: {
|