Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-01/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
},
experiments: {
css: true,
mfAsyncStartup: true,
},

module: {
Expand Down
5 changes: 0 additions & 5 deletions comprehensive-demo-react18/app-01/src/bootstrap.jsx

This file was deleted.

6 changes: 5 additions & 1 deletion comprehensive-demo-react18/app-01/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
import('./bootstrap');
import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(<App />, document.getElementById('root'));
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-01/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module.exports = {
new ModuleFederationPlugin({
name: 'app_01',
filename: 'remoteEntry.js',
experiments: { asyncStartup: true },
remotes: {
app_02: 'app_02@http://localhost:3002/remoteEntry.js',
app_03: 'app_03@http://localhost:3003/remoteEntry.js',
Expand Down
8 changes: 4 additions & 4 deletions comprehensive-demo-react18/app-02/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"@babel/preset-react": "^7.22.15",
"@material-ui/core": "^4.12.4",
"@module-federation/enhanced": "0.17.1",
"@rspack/cli": "1.4.11",
"@rspack/core": "1.4.11",
"@rspack/dev-server": "1.1.3",
"@rspack/cli": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/core": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/dev-server": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"babel-loader": "^9.1.3",
"html-webpack-plugin": "^5.6.0",
"react": "18.3.1",
Expand All @@ -21,7 +21,7 @@
"webpack-cli": "^5.1.4"
},
"devDependencies": {
"@rspack/plugin-react-refresh": "1.4.3",
"@rspack/plugin-react-refresh": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"react-refresh": "0.14.2"
},
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions comprehensive-demo-react18/app-02/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
optimization: {
minimize: false,
},
experiments: {
css: true,
mfAsyncStartup: true,
},
Comment on lines +21 to +24

Check failure

Code scanning / CodeQL

Overwritten property Error

This property is overwritten by
another property
in the same object literal.

Copilot Autofix

AI 2 days ago

To fix this problem, combine the contents of both experiments properties into a single definition, ensuring that no desired fields are lost. Only one experiments property should remain. The fix should be performed in comprehensive-demo-react18/app-02/rspack.config.js, specifically from lines 21–24 and 64–66. Merge the properties so that experiments contains both css: true and mfAsyncStartup: true. Remove the duplicate second definition (experiments at lines 64–66), and ensure only one experiments block remains in the exported configuration object.

No imports or additional definitions are required.


Suggested changeset 1
comprehensive-demo-react18/app-02/rspack.config.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/comprehensive-demo-react18/app-02/rspack.config.js b/comprehensive-demo-react18/app-02/rspack.config.js
--- a/comprehensive-demo-react18/app-02/rspack.config.js
+++ b/comprehensive-demo-react18/app-02/rspack.config.js
@@ -61,9 +61,7 @@
       },
     ],
   },
-  experiments: {
-    css: true,
-  },
+  // Removed duplicate 'experiments' property. See line 21 for the correct, merged definition.
 
   plugins: [
     new ModuleFederationPlugin({
EOF
@@ -61,9 +61,7 @@
},
],
},
experiments: {
css: true,
},
// Removed duplicate 'experiments' property. See line 21 for the correct, merged definition.

plugins: [
new ModuleFederationPlugin({
Copilot is powered by AI and may make mistakes. Always verify output.
devServer: {
port: 3002,
hot: true,
Expand Down
5 changes: 0 additions & 5 deletions comprehensive-demo-react18/app-02/src/bootstrap.js

This file was deleted.

6 changes: 5 additions & 1 deletion comprehensive-demo-react18/app-02/src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
import('./bootstrap');
import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(<App />, document.getElementById('root'));
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-02/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
new ModuleFederationPlugin({
name: 'app_02',
filename: 'remoteEntry.js',
experiments: { asyncStartup: true },
remotes: {
app_01: 'app_01@http://localhost:3001/remoteEntry.js',
app_03: 'app_03@http://localhost:3003/remoteEntry.js',
Expand Down
6 changes: 3 additions & 3 deletions comprehensive-demo-react18/app-03/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"@babel/core": "^7.23.2",
"@babel/preset-react": "^7.22.15",
"@module-federation/enhanced": "0.17.1",
"@rspack/cli": "1.4.11",
"@rspack/core": "1.4.11",
"@rspack/dev-server": "1.1.3",
"@rspack/cli": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/core": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/dev-server": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"babel-loader": "^9.1.3",
"html-webpack-plugin": "^5.6.0",
"react": "18.3.1",
Expand Down
4 changes: 4 additions & 0 deletions comprehensive-demo-react18/app-03/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ module.exports = {
publicPath: 'auto',
uniqueName: 'app3',
},
experiments: {
css: true,
mfAsyncStartup: true,
},

module: {
rules: [
Expand Down
6 changes: 5 additions & 1 deletion comprehensive-demo-react18/app-03/src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
import('./bootstrap');
import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(<App />, document.getElementById('root'));
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-03/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = {
new ModuleFederationPlugin({
name: 'app_03',
filename: 'remoteEntry.js',
experiments: { asyncStartup: true },
remotes: {
app_01: 'app_01@http://localhost:3001/remoteEntry.js',
},
Expand Down
6 changes: 3 additions & 3 deletions comprehensive-demo-react18/app-04/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"devDependencies": {
"@module-federation/enhanced": "0.17.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
"@rspack/cli": "1.4.11",
"@rspack/core": "1.4.11",
"@rspack/dev-server": "1.1.3",
"@rspack/cli": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/core": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/dev-server": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"cross-env": "7.0.3",
"css-loader": "7.1.2",
"html-webpack-plugin": "5.6.0",
Expand Down
71 changes: 71 additions & 0 deletions comprehensive-demo-react18/app-04/public/mf-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"id": "app_04",
"name": "app_04",
"metaData": {
"name": "app_04",
"type": "app",
"buildInfo": {
"buildVersion": "1.0.0",
"buildName": "comprehensive-demo-react18_app-04"
},
"remoteEntry": {
"name": "remoteEntry.js",
"path": "",
"type": "global"
},
"types": {
"path": "",
"name": "",
"zip": "",
"api": ""
},
"globalName": "app_04",
"pluginVersion": "0.17.1",
"prefetchInterface": false,
"publicPath": "auto"
},
"shared": [],
"remotes": [],
"exposes": [
{
"id": "app_04:App",
"name": "App",
"assets": {
"js": {
"sync": [
"875.875.js",
"__federation_expose_App.874.js"
],
"async": []
},
"css": {
"sync": [
"__federation_expose_App.874.css"
],
"async": []
}
},
"path": "./App"
},
{
"id": "app_04:loadApp",
"name": "loadApp",
"assets": {
"js": {
"sync": [
"875.875.js",
"__federation_expose_loadApp.474.js"
],
"async": []
},
"css": {
"sync": [
"__federation_expose_loadApp.474.css"
],
"async": []
}
},
"path": "./loadApp"
}
]
}
75 changes: 75 additions & 0 deletions comprehensive-demo-react18/app-04/public/mf-stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"id": "app_04",
"name": "app_04",
"metaData": {
"name": "app_04",
"type": "app",
"buildInfo": {
"buildVersion": "1.0.0",
"buildName": "comprehensive-demo-react18_app-04"
},
"remoteEntry": {
"name": "remoteEntry.js",
"path": "",
"type": "global"
},
"types": {
"path": "",
"name": "",
"zip": "",
"api": ""
},
"globalName": "app_04",
"pluginVersion": "0.17.1",
"prefetchInterface": false,
"publicPath": "auto"
},
"shared": [],
"remotes": [],
"exposes": [
{
"path": "./App",
"id": "app_04:App",
"name": "App",
"requires": [],
"file": "src/main.js",
"assets": {
"js": {
"sync": [
"875.875.js",
"__federation_expose_App.874.js"
],
"async": []
},
"css": {
"sync": [
"__federation_expose_App.874.css"
],
"async": []
}
}
},
{
"path": "./loadApp",
"id": "app_04:loadApp",
"name": "loadApp",
"requires": [],
"file": "src/loadApp.js",
"assets": {
"js": {
"sync": [
"875.875.js",
"__federation_expose_loadApp.474.js"
],
"async": []
},
"css": {
"sync": [
"__federation_expose_loadApp.474.css"
],
"async": []
}
}
}
]
}
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-04/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ module.exports = {
devtool: prod ? false : 'source-map',
experiments: {
css: true,
mfAsyncStartup: true,
},
};
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-04/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module.exports = {
new ModuleFederationPlugin({
name: 'app_04',
filename: 'remoteEntry.js',
experiments: { asyncStartup: true },
exposes: {
'./App': './src/main.js',
'./loadApp': './src/loadApp.js',
Expand Down
6 changes: 3 additions & 3 deletions comprehensive-demo-react18/app-05/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"devDependencies": {
"@module-federation/enhanced": "0.17.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
"@rspack/cli": "1.4.11",
"@rspack/core": "1.4.11",
"@rspack/dev-server": "1.1.3",
"@rspack/cli": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/core": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"@rspack/dev-server": "npm:@rspack-canary/browser@1.6.2-canary-4e6be088-20251110224718",
"cross-env": "7.0.3",
"html-webpack-plugin": "5.6.0",
"lit-element": "2.5.1",
Expand Down
3 changes: 3 additions & 0 deletions comprehensive-demo-react18/app-05/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ module.exports = {
uniqueName: 'app5',
},
mode,
experiments: {
mfAsyncStartup: true,
},
plugins: [
new ModuleFederationPlugin({
name: 'app_05',
Expand Down
1 change: 1 addition & 0 deletions comprehensive-demo-react18/app-05/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
new ModuleFederationPlugin({
name: 'app_05',
filename: 'remoteEntry.js',
experiments: { asyncStartup: true },
exposes: {
'./ActionButton': './src/components/action-button.ts',
'./AlertBox': './src/components/alert-box.ts',
Expand Down
7 changes: 7 additions & 0 deletions comprehensive-demo-react18/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@
"concurrently": "8.2.2",
"playwright": "^1.54.2",
"wait-on": "7.2.0"
},
"pnpm": {
"overrides": {
"@rspack/core": "npm:@rspack-canary/core@1.6.2-canary-4e6be088-20251110224718",
"@rspack/dev-server": "npm:@rspack-canary/dev-server@1.6.2-canary-4e6be088-20251110224718",
"@rspack/plugin-react-refresh": "npm:@rspack-canary/plugin-react-refresh@1.6.2-canary-4e6be088-20251110224718"
}
}
}
Loading
Loading