Replies: 1 comment
-
Vite Ruby does not add any defaults related to chunking, and Vite doesn't add any defaults since 2.8. It's either related to the structure of your application (with Rollup deciding that's the best approach), or with the way jQuery is packaged (esm/cjs heuristics in Vite or Rollup). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am loving vite and vite-ruby as I experiment with it and learn more about it, thank you for it!
I have a question that I'm not sure if it's about default vite (or rollup?) or vite-ruby specifically...
Vite seems to be "chunking" jquery separately by default? Without doing any custom config, the build process is outputting a separate jquery chunk.
But if I experiment with specifying manualChunks....
Now jquery is no longer separately chunked unless I explicitly include it in manualChunks. But without specifying
manualChunks
at all, jQuery was already chunked?Is there some default manualChunks configuration that vite/vite-ruby/rollup has, where jquery is already in there if unspecified? Googling I can't find any mention of this. I'm just curious to understand what is going on.
I import jquery simply like
import $ from jQuery
Beta Was this translation helpful? Give feedback.
All reactions