Skip to content

Commit

Permalink
fix relative path in container
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloreitelli committed Aug 14, 2024
1 parent 8ae57a6 commit c9e9114
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/container/config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const prodConfig = {
mode: "production",
output: {
filename: "[name].[contenthash].js",
publicPath: "container/latest/",
publicPath: "/container/latest/",
},
plugins: [
new ModuleFederationPlugin({
Expand Down
12 changes: 5 additions & 7 deletions packages/container/src/components/AuthApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ export default function AuthApp({ onSignIn }) {

useEffect(() => {
const { onParentNavigate } = mount(ref.current, {
onNavigate: ({ pathname: nexPathname }) => {
initialPath: history.location.pathname,
onNavigate: ({ pathname: nextPathname }) => {
const { pathname } = history.location;
if (pathname !== nexPathname) {
history.push(nexPathname);
if (pathname !== nextPathname) {
history.push(nextPathname);
}
},
initialPath: history.location.pathname,
onSignIn: () => {
onSignIn();
},
onSignIn: onSignIn,
});
history.listen(onParentNavigate);
}, []);
Expand Down

0 comments on commit c9e9114

Please sign in to comment.