Skip to content

Commit 59a9991

Browse files
committed
maint(build): Allow multiple bundles expose jQuery. Needed for module federation where multiple Webpack entry points are loaded.
1 parent 3c51dd2 commit 59a9991

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webpack/webpack.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ module.exports = (env, argv, config) => {
5555
test: require.resolve("jquery"),
5656
loader: "expose-loader",
5757
options: {
58-
exposes: ["$", "jQuery"],
58+
exposes: [
59+
// Webpack module federation does load multiple expose-loaders. Just override previous set values.
60+
{ globalName: "$", override: true },
61+
{ globalName: "jQuery", override: true },
62+
],
5963
},
6064
},
6165
{

0 commit comments

Comments
 (0)