Skip to content

ssr.noExternal option — any downsides? #112

Answered by frandiox
plashenkov asked this question in Q&A
Discussion options

You must be logged in to vote

It definitely makes things easier when you deploy to prod. However, Vite's bundling is not perfect (I think it's marked as experimental, together with all the SSR stuff). It has issues with some dependencies such as aws-sdk, etc. and this can change in any Vite update.

Other than that, as far as I understand, Vite would wrap your CommonJS modules in some extra code, making it slightly slower to load compared to a raw require in Node. But the runtime should be similar.

This wouldn't affect the dev server because Vite only bundles during build.

So I would say, try to bundle your app and if it works, go for it 👍

-- If you have e2e/integration tests, I would run them against the built app rat…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by plashenkov
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