fix:旧浏览器存储方法兼容修改
This commit is contained in:
@@ -29,7 +29,8 @@ export default defineConfig(configEnv => {
|
||||
open: false,
|
||||
proxy: createViteProxy(viteEnv, configEnv.command === 'serve'),
|
||||
fs: {
|
||||
cachedChecks: false
|
||||
cachedChecks: false,
|
||||
strict: false // 添加这个配置
|
||||
}
|
||||
},
|
||||
preview: {
|
||||
@@ -40,6 +41,24 @@ export default defineConfig(configEnv => {
|
||||
sourcemap: viteEnv.VITE_SOURCE_MAP === 'Y',
|
||||
commonjsOptions: {
|
||||
ignoreTryCatch: false
|
||||
},
|
||||
// 添加以下配置
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: undefined, // 禁用代码分割
|
||||
chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||
entryFileNames: 'assets/js/[name]-[hash].js',
|
||||
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]'
|
||||
}
|
||||
},
|
||||
// 添加以下配置
|
||||
chunkSizeWarningLimit: 2000,
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user