Skip to content

Commit

Permalink
Bundle polyfills just once
Browse files Browse the repository at this point in the history
  • Loading branch information
plesiecki committed Mar 7, 2022
1 parent fd09fa9 commit 1e8ff03
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ const bundleAnalyzerConfig = {
]
}

const polyfillsConfig = {
entry: {
polyfills: "./src/client/polyfills.ts",
}
};

const prodConfig = {
name: "client-modern",
mode: "production",
entry: {
main: "./src/client/main.tsx",
polyfills: "./src/client/polyfills.ts",
},
optimization: {
minimize: true,
Expand Down Expand Up @@ -68,6 +73,6 @@ const es5Config = {
};

module.exports = [
merge.smart(commonConfig, prodConfig, bundleAnalyzerConfig),
merge.smart(commonConfig, prodConfig, polyfillsConfig, bundleAnalyzerConfig),
merge.smart(commonConfig, prodConfig, es5Config),
]

0 comments on commit 1e8ff03

Please sign in to comment.