Skip to content

How to handle Vite's base config while importing utility modules in serve mode? #170

Discussion options

You must be logged in to vote

There are a few things wrong in your files. For example, the shared import map should not have paths that point to things in the /src folder. Those belong in the DEV import map. Then you have the origin set to localhost on port 9010, don't know why since the project is running from port 9000.

Then in the utility project, you're setting the server port, but that's unnecessary as vite-plugin-single-spa sets it for you. What's the point of asking the developer to specify the port in two places, right? My plug-in takes care of the preview and server ports for you, as well as server.origin.

Anyway, your problem comes from how vite-plugin-externalize-dependencies work, plus how Vite works. The …

Replies: 7 comments 3 replies

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
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Khodidas-withLoveKD
Comment options

Comment options

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

You must be logged in to vote
2 replies
@webJose
Comment options

@Khodidas-withLoveKD
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants