It's splitsville baby!
Bundler plugin for Parcel 2 that allows splitting bundles on arbitrary files
Add as a dev dependency
yarn add -D parcel-bundler-splitable
Set as bundler in .parcelrc
{
"extends": "@parcel/config-default",
"bundler": "parcel-bundler-splitable"
}
Set the "bundleSplits" property in your package.json
...
"bundleSplits": [
"dist/dependencies.js"
]
...