Replies: 2 comments 1 reply
-
So you want to create a vendor bundle. This isn't supported natively at the moment but could also be achieved with a custom bundler plugin (for Parcel 2). |
Beta Was this translation helpful? Give feedback.
-
Is there any better way to achieve vendor bundles in recent Parcel v2 versions than to implement a custom bundler plugin (which BTW still has an unstable API AFAICS)? I am frequently working on projects that include rather large dependencies like Tensorflow.js and the like. The bundles are pretty big (> 1MB) and a new huge bundle file with a new hash is created for after each minor code change. I could remove such large packages from I am sure, I am not the only person with this use case. |
Beta Was this translation helpful? Give feedback.
-
Essentially, I'm looking for a way to bundle everything included from node_modules in a seperate js bundle from the source code and entrypoint of my application. I already considered having a barrel file export external files, but I'm wondering if there is any easier way that doesn't require a refactor.
EDIT: Just attempted using a barrel file and adding it as an entrypoint, but quickly realized this doesn't actually split the bundle. Is there a proper way to do this for nodejs apps?
Beta Was this translation helpful? Give feedback.
All reactions