Skip to content

Commit

Permalink
Fix ssr example (#18)
Browse files Browse the repository at this point in the history
* fix filename for module federation

* add interactive example into ssr example
  • Loading branch information
7rulnik authored May 4, 2020
1 parent ee554dd commit cf2d070
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server-side-rendering/website1/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import SomeComponent from "website2/SomeComponent";
export default () => (
<div>
<h1>This is website 1</h1>
<h1 onClick={() => alert("website1 is interactive")}>This is website 1</h1>
<SomeComponent />
</div>
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = merge.smart(common, {
new ModuleFederationPlugin({
name: "website2",
library: { type: "var", name: "website2" },
filename: "src/index.js",
filename: "container.js",
exposes: {
SomeComponent: "./src/components/SomeComponent",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SomeComponent = () => (
border: "1px solid black",
backgroundColor: "#ccc",
}}
onClick={() => alert("website2 is interactive")}
>
Header
</div>
Expand Down

0 comments on commit cf2d070

Please sign in to comment.