-
-
Notifications
You must be signed in to change notification settings - Fork 362
docs: var host + esm remote (vite) workaround #4199
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
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Since we are not able to generate Moreover: I would like to be able to generate Example: // vite.config.ts
import { federation } from '@module-federation/vite';
// ...
federation({
name: 'viteRemote',
filename: 'remoteEntry.js', // for "esm" environments
varFilename: 'varRemoteEntry.js', // from "var" environments
// ...
})@gioboa wdyt? I could publish feature request in https://github.com/module-federation/vite |
ee91385 to
e6d90e2
Compare
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gioboa wdyt? I could publish feature request in https://github.com/module-federation/vite
Yes, you can drop a PR for that 👍 thanks
Description
If we build
remoteapplication using@module-federation/vite, it generates esmremoteEntry.jsfile, thus we are not able to import it inhostapplication with "old fashion way" (see example)It becomes a huge problem when we are not able to rewrite our
hostapplication (this is my case, I don't controlhostapplication at all).Therefore I've come up with some workaround (see docs changes).
I've tested it with webpack/vite, with buildtime/runtime usages and it works like a charm.
If you like this solution I will add Chinese translation too.
Related Issue
originjs/vite-plugin-federation#368
module-federation/vite#247
Types of changes
Checklist