Skip to content

Commit 32aa2ec

Browse files
committed
Additonal polyfill configuration
1 parent bc07798 commit 32aa2ec

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

webpack.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ module.exports = {
1818
type: "filesystem",
1919
},
2020
entry: {
21-
index: ["./src/polyfills.ts", "./src/index.ts"],
22-
repl: ["./src/polyfills.ts", "./src/repl.ts"],
21+
polyfills: "./src/polyfills.ts",
22+
index: { import: "./src/index.ts", dependOn: "polyfills" },
23+
repl: { import: "./src/repl.ts", dependOn: "polyfills" },
2324
},
2425
resolve: {
2526
extensions: [".ts", ".js"],
@@ -144,12 +145,14 @@ module.exports = {
144145
}),
145146
new HtmlWebpackPlugin({
146147
template: "views/index.html",
147-
chunks: ["index"],
148+
chunks: ["polyfills", "index"],
149+
chunksSortMode: "manual",
148150
}),
149151
new HtmlWebpackPlugin({
150152
filename: "repl.html",
151153
template: "views/repl.html",
152-
chunks: ["repl"],
154+
chunks: ["polyfills", "repl"],
155+
chunksSortMode: "manual",
153156
}),
154157
],
155158

0 commit comments

Comments
 (0)