Skip to content

Commit ab6919d

Browse files
committed
debug samples for CI
1 parent c106b1b commit ab6919d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/webpack/index.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,19 @@ export async function getConfig(): Promise<Configuration> {
5454
getEnv() === Env.Prod
5555
? buildConfig.publicUrl
5656
: getPathFromUrl(buildConfig.publicUrl)
57-
)
57+
),
58+
environment: {
59+
// 这里控制 webpack 本身的运行时代码(而不是业务代码),
60+
// 对于语言 feature 先全部配合不支持,以确保 webpack 会产出兼容性最好的代码;
61+
// TODO: 后续考虑通过使用 build config 中的 targets.browsers 来挨个判断是否支持
62+
arrowFunction: false,
63+
bigIntLiteral: false,
64+
const: false,
65+
destructuring: false,
66+
dynamicImport: false,
67+
forOf: false,
68+
module: false
69+
}
5870
},
5971
optimization: {
6072
minimizer: [

0 commit comments

Comments
 (0)