Commit 0f0f37e5 authored by 张伯涛's avatar 张伯涛

打包生成的dist文件里的js文件重命名

parent 014809e1
......@@ -8,6 +8,7 @@ function resolve(dir) {
}
const name = defaultSettings.title || 'vue Admin Template' // page title
const Timestamp = new Date().getTime()
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
......@@ -42,7 +43,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://10.5.87.231:10010/`,
// target: `http://zt.51newsoftware.com:10184/`,
target: 'http://192.168.1.47:8090/',
target: 'http://10.19.103.15:8090/',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......@@ -72,6 +73,11 @@ module.exports = {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: name,
output: {
// 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】
filename: `static/js/[name].${Timestamp}.js`,
chunkFilename: `static/js/[name].${Timestamp}.js`
},
plugins: [
new CompressionWebpackPlugin({
filename: '[path].gz[query]', // 提示compression-webpack-plugin@3.0.0的话asset改为filename
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment