Skip to content

feat: embed runtime #4260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 3 additions & 1 deletion .cursorignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
**/dist/**
**/dist/**

node_modules
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ buildServer
/comprehensive-demo-react*/**/public/*.js
/comprehensive-demo-react*/**/public/*.css
*.map
mf-manifest.json
mf-stats.json

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 @@ -79,6 +79,7 @@ module.exports = {
'./SideNav': './src/SideNav',
'./Page': './src/Page',
},
experiments: {federationRuntime: 'hoisted'},
shared: {
...deps,
'@material-ui/core': {
Expand Down
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 @@ -69,6 +69,7 @@ module.exports = {
app_01: 'app_01@http://localhost:3001/remoteEntry.js',
app_03: 'app_03@http://localhost:3003/remoteEntry.js',
},
experiments: {federationRuntime: 'hoisted'},
exposes: {
'./Dialog': './src/Dialog',
'./Tabs': './src/Tabs',
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 @@ -62,6 +62,7 @@ module.exports = {
remotes: {
app_01: 'app_01@http://localhost:3001/remoteEntry.js',
},
experiments: {federationRuntime: 'hoisted'},
exposes: {
'./Button': './src/Button',
},
Expand Down
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 @@ -62,6 +62,7 @@ module.exports = {
'./App': './src/main.js',
'./loadApp': './src/loadApp.js',
},
experiments: {federationRuntime: 'hoisted'},
shared: [],
}),
new MiniCssExtractPlugin({
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 @@ -47,6 +47,7 @@ module.exports = {
'./AlertBox': './src/components/alert-box.ts',
'./components': './src/index.ts',
},
experiments: {federationRuntime: 'hoisted'},
shared: [],
}),
new HtmlWebpackPlugin({
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"overrides": {
"cypress": "13.12.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0"
"@types/react-dom": "18.3.0",
"@module-federation/nextjs-mf": "0.0.0-next-20240905014927",
"@module-federation/enhanced": "0.0.0-next-20240905014927",
"@module-federation/runtime": "0.0.0-next-20240905014927",
"@module-federation/sdk": "0.0.0-next-20240905014927"
}
},
"workspaces": {
Expand Down
2,101 changes: 943 additions & 1,158 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading