@module-federation/bridge-react-webpack-plugin 0.0.0-next-20240718072411 → 0.0.0-next-20240718080108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/dist/index.cjs.js +7 -4
- package/dist/index.es.js +7 -4
- package/package.json +2 -2
- package/src/index.ts +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @module-federation/bridge-react-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-20240718080108
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- @module-federation/sdk@0.0.0-next-
|
|
7
|
+
- @module-federation/sdk@0.0.0-next-20240718080108
|
|
8
8
|
|
|
9
9
|
## 0.2.6
|
|
10
10
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -38,11 +38,14 @@ class ReactBridgeAliasChangerPlugin {
|
|
|
38
38
|
if (fs.existsSync(targetFilePath)) {
|
|
39
39
|
const originalResolve = compiler.options.resolve || {};
|
|
40
40
|
const originalAlias = originalResolve.alias || {};
|
|
41
|
-
const updatedAlias = {
|
|
42
|
-
compiler.options.resolve = {
|
|
41
|
+
const updatedAlias = {
|
|
43
42
|
// allow this config to be override
|
|
44
|
-
alias:
|
|
45
|
-
...
|
|
43
|
+
[this.alias]: targetFilePath,
|
|
44
|
+
...originalAlias
|
|
45
|
+
};
|
|
46
|
+
compiler.options.resolve = {
|
|
47
|
+
...originalResolve,
|
|
48
|
+
alias: updatedAlias
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
});
|
package/dist/index.es.js
CHANGED
|
@@ -37,11 +37,14 @@ class ReactBridgeAliasChangerPlugin {
|
|
|
37
37
|
if (fs.existsSync(targetFilePath)) {
|
|
38
38
|
const originalResolve = compiler.options.resolve || {};
|
|
39
39
|
const originalAlias = originalResolve.alias || {};
|
|
40
|
-
const updatedAlias = {
|
|
41
|
-
compiler.options.resolve = {
|
|
40
|
+
const updatedAlias = {
|
|
42
41
|
// allow this config to be override
|
|
43
|
-
alias:
|
|
44
|
-
...
|
|
42
|
+
[this.alias]: targetFilePath,
|
|
43
|
+
...originalAlias
|
|
44
|
+
};
|
|
45
|
+
compiler.options.resolve = {
|
|
46
|
+
...originalResolve,
|
|
47
|
+
alias: updatedAlias
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
50
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/bridge-react-webpack-plugin",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240718080108",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./*": "./*"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
20
|
+
"@module-federation/sdk": "0.0.0-next-20240718080108"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.2.2",
|
package/src/index.ts
CHANGED
|
@@ -40,13 +40,16 @@ class ReactBridgeAliasChangerPlugin {
|
|
|
40
40
|
const originalAlias = originalResolve.alias || {};
|
|
41
41
|
|
|
42
42
|
// Update alias
|
|
43
|
-
const updatedAlias = {
|
|
43
|
+
const updatedAlias = {
|
|
44
|
+
// allow this config to be override
|
|
45
|
+
[this.alias]: targetFilePath,
|
|
46
|
+
...originalAlias,
|
|
47
|
+
};
|
|
44
48
|
|
|
45
49
|
// Update the webpack configuration
|
|
46
|
-
compiler.options.resolve = {
|
|
47
|
-
// allow this config to be override
|
|
48
|
-
alias: updatedAlias,
|
|
50
|
+
compiler.options.resolve = {
|
|
49
51
|
...originalResolve,
|
|
52
|
+
alias: updatedAlias,
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
55
|
});
|