Is it possible to specify libraries you actually want duplicated across bundles when using webpack splitchunk??
Context:
I am working with a large monorepo with multiple packages and entry points. The current webpack configuration uses
{ optimization: { splitChunks: { chunks: "all" } } }
with multiple entry points across the monorepo. It produces a vendor file for each package in the monorepo as well as a large vendors~boot file with all common dependencies to prevent duplication across each bundle.
Each section of the app will load the main vendors bundle, and the bundles related to the package that its currently in.
There are a couple of large libraries used in small areas of the application which I want to allow to be duplicated. I don't want those libraries split out into the common chunk and loaded everywhere. so basically i want certain libraries duplicated which to my knowledge is exactly what splitchunks prevents.