build(demo-vue): adjust production build config and add terser
1. 新增terser依赖包用于代码压缩 2. 关闭terser压缩并注释rollup打包配置 3. 修改生产环境的NODE_ENV和API接口地址
This commit is contained in:
@@ -20,13 +20,13 @@ export default defineConfig({
|
||||
outDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
sourcemap: false,
|
||||
minify: 'terser',
|
||||
rollupOptions: {
|
||||
output: {
|
||||
chunkFileNames: 'js/[name]-[hash].js',
|
||||
entryFileNames: 'js/[name]-[hash].js',
|
||||
assetFileNames: '[ext]/[name]-[hash].[ext]'
|
||||
}
|
||||
}
|
||||
minify: false,
|
||||
// rollupOptions: {
|
||||
// output: {
|
||||
// chunkFileNames: 'js/[name]-[hash].js',
|
||||
// entryFileNames: 'js/[name]-[hash].js',
|
||||
// assetFileNames: '[ext]/[name]-[hash].[ext]'
|
||||
// }
|
||||
// }
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user