mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
更新依赖版本,优化组件和服务工作者的导入,调整 SCSS 混合宏,修复 Vite 配置中的文件缓存大小限制
This commit is contained in:
+10
-6
@@ -55,12 +55,11 @@ export default defineConfig({
|
||||
},
|
||||
],
|
||||
navigateFallback: '/index.html', // 确保页面路由正确加载
|
||||
navigateFallbackDenylist: [
|
||||
/.*\/api\/v\d+\/system\/logging.*/,
|
||||
],
|
||||
navigateFallbackDenylist: [/.*\/api\/v\d+\/system\/logging.*/],
|
||||
},
|
||||
injectManifest: {
|
||||
rollupFormat: 'iife',
|
||||
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
@@ -157,16 +156,14 @@ export default defineConfig({
|
||||
'@images': fileURLToPath(new URL('./src/assets/images/', import.meta.url)),
|
||||
'@styles': fileURLToPath(new URL('./src/styles/', import.meta.url)),
|
||||
'@configured-variables': fileURLToPath(new URL('./src/styles/variables/_template.scss', import.meta.url)),
|
||||
'apexcharts': fileURLToPath(new URL('node_modules/apexcharts-clevision', import.meta.url)),
|
||||
'apexcharts': fileURLToPath(new URL('node_modules/apexcharts', import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
// 控制console.log()是否被移除,生产环境建议移除,存在内存泄漏风险
|
||||
drop_console: true,
|
||||
// 控制debugger是否被移除,酌情处理
|
||||
drop_debugger: false,
|
||||
},
|
||||
},
|
||||
@@ -193,4 +190,11 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
quietDeps: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user