How to bundle server node_modules? #18286
Unanswered
rtcpw
asked this question in
CLI - SSR mode
Replies: 1 comment 6 replies
-
|
With Vite you can bundle dependencies with ssr.noExternal. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When building a SSR app, the output artifacts (in
./dist/ssr) containpackage.jsonand require me to runnpm installbefore deploying it.So far, this has worked fine for me, but lately I am starting to hit a hard size limit in the platform provider that I use. All of the
./dist/ssr/node_modulespackages are just too large, and I am looking for a way to bundle and minify this into theindex.js.Is it possible to bundle all of the
node_modulesthat the server process requires intoindex.js, in order to avoid having to deploy thenode_modulesdirectory?Beta Was this translation helpful? Give feedback.
All reactions