优化调整web端内存溢出的问题

This commit is contained in:
aixianling
2023-04-04 09:20:21 +08:00
parent f3cf8360c2
commit f0dfc59828

View File

@@ -28,9 +28,8 @@ module.exports = {
.add(path.resolve(__dirname, 'examples')) .add(path.resolve(__dirname, 'examples'))
.add(path.resolve(__dirname, 'ui')) .add(path.resolve(__dirname, 'ui'))
.end().use('babel').loader('babel-loader').tap(options => options); .end().use('babel').loader('babel-loader').tap(options => options);
config.output.chunkFilename('[name].js');
config.plugins.delete("friendly-errors"); config.plugins.delete("friendly-errors");
config.plugin("limit").use(require("webpack/lib/optimize/LimitChunkCountPlugin"), [{maxChunks: 10}]).tap(options => options) config.plugin("limit").use(require("webpack/lib/optimize/LimitChunkCountPlugin"), [{maxChunks: 5}]).tap(options => options)
}, },
devServer: { devServer: {
host: '0.0.0.0', //主机地址 host: '0.0.0.0', //主机地址