Skip to content

Import module error in spa.tsx when running react microfrontend #193

Answered by webJose
Jordan-Eckowitz asked this question in Q&A
Discussion options

You must be logged in to vote

I have never tested my plug-in with SystemJS modules. Feel free to do so. Once a guy told me that works just fine. This is set in Vite options, completely outside my plug-in. It is a rollup option (the output format). Look the setting up, and set it to 'system'. Note, however, that Vite is incapable of serving SystemJS modules while in serve mode (npm run dev). If you do SystemJS, you can only work locally with built projects. Forget HMR.

Now, having said that, maybe you should follow the instructions of creating a root config project using my plug-in. Then you'll be working with ES modules, HMR will probably work for you, and overall things will be simpler.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by webJose
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #190 on August 21, 2024 23:18.