Skip to content

Commit 178fa0f

Browse files
Merge pull request #4 from module-federation/remove-basic-bootstrap
remove import bootstrap from apps that can support it
2 parents 0946e6b + 07146c8 commit 178fa0f

File tree

14 files changed

+549
-33547
lines changed

14 files changed

+549
-33547
lines changed

basic-host-remote/app1/src/bootstrap.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

basic-host-remote/app1/src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
import("./bootstrap");
1+
import App from "./App";
2+
import React from "react";
3+
import ReactDOM from "react-dom";
4+
5+
ReactDOM.render(<App />, document.getElementById("root"));

basic-host-remote/app2/src/App.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// have to have a promise (import()) somewhere for exposed code
2+
// you can either use import bootstrap, like i do here
3+
// or if you dont like import(bootstrap) you can get rid of that but need to import like
4+
5+
// this like here: const LocalButton = React.lazy(()=>import('./Button'));
6+
// then you can remove the need for import(bootstrap)
7+
//https://github.com/webpack/webpack/issues/10352#issuecomment-622016042
18
import LocalButton from "./Button";
29
import React from "react";
310

basic-host-remote/app2/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
// https://github.com/webpack/webpack/issues/10352#issuecomment-622016042
12
import("./bootstrap");

comprehensive-demo/yarn.lock

Lines changed: 0 additions & 5453 deletions
This file was deleted.

proprietary-tools

0 commit comments

Comments
 (0)