fix(mp): 真机调试 EMFILE — 关闭 dev 模式 source map
真机调试时报 EMFILE: too many open files,根因是 dev 构建 默认生成 69 个 .map 文件,DevTools + webpack watcher 同时 打开导致文件描述符耗尽。通过 chain.devtool(false) 关闭 source map,dist 文件数从 356 降至 269。
This commit is contained in:
@@ -6,6 +6,9 @@ export default {
|
|||||||
miniCssExtractPluginOption: {
|
miniCssExtractPluginOption: {
|
||||||
ignoreOrder: true,
|
ignoreOrder: true,
|
||||||
},
|
},
|
||||||
|
webpackChain(chain) {
|
||||||
|
chain.devtool(false);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
h5: {},
|
h5: {},
|
||||||
} satisfies UserConfigExport;
|
} satisfies UserConfigExport;
|
||||||
|
|||||||
Reference in New Issue
Block a user