Skip to content
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

Add module federation plugin #1

Merged
merged 13 commits into from
Jan 10, 2024
Merged

Add module federation plugin #1

merged 13 commits into from
Jan 10, 2024

Conversation

MrLeebo
Copy link
Member

@MrLeebo MrLeebo commented Dec 15, 2023

  • Adds module-federation plugin, allowing cms to import components such as Breadcrumb and SiteTour from n360
     import Breadcrumb from "host/breadcrumb";
  • Adds tsconfig and enable ts checking for .js files
  • Run npm run start:mf to serve federated content at http://localhost:8080/remoteEntry.js
  • Currently is only serving the "hello-world" blog post's pageData because I haven't figured out how to federate gatsby templates yet

@MrLeebo
Copy link
Member Author

MrLeebo commented Jan 2, 2024

I'm somewhat torn between whether to define pages using the file-based framework (e.g. src/pages/faq.tsx) vs creating each page definition with createPage() in gatsby-node.js. createPage() offers a little better control over the shape of the pageData and there are not as many unused fields in the object, but src/pages/ requires less boilerplate when creating a new page.

@MrLeebo MrLeebo marked this pull request as ready for review January 10, 2024 15:41
@MrLeebo MrLeebo requested a review from nsmmrs January 10, 2024 18:14
@MrLeebo
Copy link
Member Author

MrLeebo commented Jan 10, 2024

@nsmmrs please review this PR and create a new branch for your FAQ import script changes, and we'll get this merged in

@nsmmrs
Copy link
Collaborator

nsmmrs commented Jan 10, 2024

@MrLeebo Will do.

docker-compose.yml Outdated Show resolved Hide resolved
…moteEntry.js if there are no exported components
@MrLeebo MrLeebo merged commit cd81512 into master Jan 10, 2024
@MrLeebo MrLeebo deleted the mf branch January 10, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants