chore: use official @module-federation/vite - #21605
Conversation
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you apply the label |
Lms24
left a comment
There was a problem hiding this comment.
Hey @gioboa thanks for opening this PR and apologies for the late review!
I ran CI and it seems like building the test app now fails:
error during build:
[commonjs--resolver] Missing "./module-runner" specifier in "vite" package
at e (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46042:25)
at n (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46042:627)
at o (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46042:1297)
at resolveExportsOrImports (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46663:18)
at resolveDeepImport (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46686:25)
at tryNodeResolve (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46451:16)
at Object.resolveId (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/vite@5.4.21/node_modules/vite/dist/node/chunks/dep-BK3b2jBa.js:46201:19)
at file:///home/runner/work/_temp/test-application/node_modules/.pnpm/rollup@4.62.2/node_modules/rollup/dist/es/shared/node-entry.js:23026:40
at async PluginDriver.hookFirstAndGetPlugin (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/rollup@4.62.2/node_modules/rollup/dist/es/shared/node-entry.js:22908:28)
at async resolveId (file:///home/runner/work/_temp/test-application/node_modules/.pnpm/rollup@4.62.2/node_modules/rollup/dist/es/shared/node-entry.js:21369:26)
are you still interested in continuing to work on this? No worries if not! I agree that switching to the official plugin is a good change, so I'd be happy to merge this once CI passes.
FYI, the easiest way to run e2e tests locally is to go into dev-packages/e2e-tests and run yarn test:run browser-mfe-vite.
gioboa
left a comment
There was a problem hiding this comment.
are you still interested in continuing to work on this?
Yeah, let me check this
|
@Lms24 now it should work 🤞 |
|
thank you! |
@module-federation/vite is the official and supported Module Federation integration for Vite. Read the announcement.
It gives the maintained path for Vite-based federation, with upstream support for compatibility fixes, future Vite changes, and new Module Federation capabilities as they evolve.
Thanks