fix(拆包优化): 修复部分异步加载的包出现 LoadingError

--bug=1026921 --user=白奇 【测试跟踪】项目设置-文件管理页面-跳转至测试跟踪页面失败 https://www.tapd.cn/55049933/s/1381589
This commit is contained in:
baiqi 2023-06-14 15:19:43 +08:00 committed by 刘瑞斌
parent f8547ca7d0
commit 7cfee34209
8 changed files with 32 additions and 16 deletions

View File

@ -1,12 +1,14 @@
const path = require('path'); const path = require('path');
const { name } = require('./package'); const { name } = require('./package');
const { defineConfig } = require('@vue/cli-service');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: '/',
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4004, port: 4004,
@ -192,4 +194,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,4 +1,5 @@
const path = require("path"); const path = require("path");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -6,7 +7,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 3000, port: 3000,
@ -121,4 +123,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -7,7 +8,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4003, port: 4003,
@ -197,4 +199,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -7,7 +8,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4002, port: 4002,
@ -176,4 +178,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -7,7 +8,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4006, port: 4006,
@ -182,4 +184,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -7,7 +8,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4001, port: 4001,
@ -176,4 +178,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const HtmlWebpackInlineSourcePlugin = require("html-webpack-inline-source-plugin"); const HtmlWebpackInlineSourcePlugin = require("html-webpack-inline-source-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
@ -11,7 +12,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4005, port: 4005,
@ -248,4 +250,4 @@ module.exports = {
]); ]);
} }
}, },
}; });

View File

@ -1,5 +1,6 @@
const path = require("path"); const path = require("path");
const { name } = require("./package"); const { name } = require("./package");
const { defineConfig } = require("@vue/cli-service");
const BundleAnalyzerPlugin = const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin; require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
@ -7,7 +8,8 @@ function resolve(dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
} }
module.exports = { module.exports = defineConfig({
publicPath: "/",
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port: 4007, port: 4007,
@ -180,4 +182,4 @@ module.exports = {
]); ]);
} }
}, },
}; });