fix(mp): lazyCodeLoading 仅生产构建启用,修复 DevTools/真机调试卡死
dev 模式(watch)下 lazyCodeLoading 导致 DevTools 内存膨胀至 2GB+ 卡死, 这是微信开发者工具的已知兼容问题。改为仅在 production 构建时启用。
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export default defineAppConfig({
|
||||
lazyCodeLoading: 'requiredComponents',
|
||||
// 仅生产构建启用,dev 模式下 lazyCodeLoading 导致 DevTools / 真机调试卡死
|
||||
...(process.env.NODE_ENV === 'production' ? { lazyCodeLoading: 'requiredComponents' as const } : {}),
|
||||
pages: [
|
||||
'pages/index/index',
|
||||
'pages/login/index',
|
||||
|
||||
Reference in New Issue
Block a user