Skip to content

Conversation

@SunsetFi
Copy link

This creates the runtime package pre-tree-shaken for @module-federation/vite

It has some small improvements over my prototype:

  • It modifies @module-federation/sdk isBrowserEnv directly, and allows the ESM code analysis to flow-through and tree-shake everything, which it does wonderfully well. This is much more elegant than replacing calls to that function, but it does mean we need to ensure this library is always working with the ESM build, not the CommonJS one.
  • It generates the appropriate source maps, squelching a warning we were getting on build
  • It has some basic tests on the compiled output.

@SunsetFi
Copy link
Author

It looks like my changes to use lint-staged don't play nice with prettier-quick. I was wondering about that... Fix incoming.

@SunsetFi
Copy link
Author

Fix to the linter in #278

@SunsetFi
Copy link
Author

Any idea why this MR isn't running my new E2E pipeline for the new library? Does it have to be merged first? I had thought changes made to the CI run in those change's PR?

@SunsetFi SunsetFi changed the base branch from main to monorepo March 17, 2025 18:42
@SunsetFi
Copy link
Author

Turns out you cant specify working directory on anything other than a run step. I fixed that for the new E2E tests, and also fixed it for the previous MR / plugin library.

Copy link
Collaborator

@gioboa gioboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this amazing help @SunsetFi

@gioboa gioboa merged commit 00ec5e6 into module-federation:monorepo Mar 17, 2025
5 checks passed
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