Skip to content

Commit 79b29e9

Browse files
test: build the import.meta alias configurations without flatMap
Node 10 has no Array.prototype.flatMap, so the case's config threw before any build there.
1 parent 04e413c commit 79b29e9

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

‎test/configCases/module/import-meta-alias-mutations/webpack.config.js‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@
66
const importMetaOptions = ["preserve-unknown", {}];
77

88
/** @type {import("../../../../types").Configuration[]} */
9-
module.exports = ["node", "web", "webworker", "universal"].flatMap((target) =>
10-
importMetaOptions.map((importMeta) => ({
11-
target,
12-
output: { module: true },
13-
module: {
14-
parser: { "javascript/auto": { importMeta } }
15-
}
16-
}))
17-
);
9+
const configurations = [];
10+
11+
for (const target of ["node", "web", "webworker", "universal"]) {
12+
for (const importMeta of importMetaOptions) {
13+
configurations.push({
14+
target,
15+
output: { module: true },
16+
module: {
17+
parser: { "javascript/auto": { importMeta } }
18+
}
19+
});
20+
}
21+
}
22+
23+
module.exports = configurations;

0 commit comments

Comments
 (0)