Skip to content

Commit ed88875

Browse files
Apply suggested changes
Apply suggested changes
1 parent 8213dd2 commit ed88875

File tree

8 files changed

+16
-35
lines changed

8 files changed

+16
-35
lines changed

apps/router-demo/router-host-2000/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "FEDERATION_DEBUG=true rsbuild dev --open",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@ant-design/icons": "^5.3.6",

apps/router-demo/router-host-v5-2200/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "FEDERATION_DEBUG=true rsbuild dev",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@ant-design/icons": "^5.3.6",

apps/router-demo/router-host-vue3-2100/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@module-federation/bridge-vue3": "workspace:*",

apps/router-demo/router-remote1-2001/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "DEBUG=true rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@module-federation/bridge-react": "workspace:*",

apps/router-demo/router-remote2-2002/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@emotion/react": "^11.11.4",

apps/router-demo/router-remote3-2003/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@module-federation/bridge-vue3": "workspace:*",

apps/router-demo/router-remote4-2004/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "rsbuild dev",
77
"build": "rsbuild build",
8-
"preview": "rsbuild preview",
9-
"test": "echo 'No tests configured'"
8+
"preview": "rsbuild preview"
109
},
1110
"dependencies": {
1211
"@emotion/react": "^11.11.4",

packages/enhanced/src/lib/sharing/SharePlugin.ts

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -184,27 +184,15 @@ class SharePlugin {
184184
process.env['FEDERATION_WEBPACK_PATH'] =
185185
process.env['FEDERATION_WEBPACK_PATH'] || getWebpackPath(compiler);
186186

187-
// Apply ConsumeSharedPlugin with enhanced error handling
188-
try {
189-
new ConsumeSharedPlugin({
190-
shareScope: this._shareScope,
191-
consumes: this._consumes,
192-
}).apply(compiler);
193-
} catch (error) {
194-
const message = error instanceof Error ? error.message : String(error);
195-
throw new Error(`Failed to apply ConsumeSharedPlugin: ${message}`);
196-
}
197-
198-
// Apply ProvideSharedPlugin with enhanced error handling
199-
try {
200-
new ProvideSharedPlugin({
201-
shareScope: this._shareScope,
202-
provides: this._provides,
203-
}).apply(compiler);
204-
} catch (error) {
205-
const message = error instanceof Error ? error.message : String(error);
206-
throw new Error(`Failed to apply ProvideSharedPlugin: ${message}`);
207-
}
187+
new ConsumeSharedPlugin({
188+
shareScope: this._shareScope,
189+
consumes: this._consumes,
190+
}).apply(compiler);
191+
192+
new ProvideSharedPlugin({
193+
shareScope: this._shareScope,
194+
provides: this._provides,
195+
}).apply(compiler);
208196
}
209197
}
210198

0 commit comments

Comments
 (0)