Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Can I use SplitChunksPlugin for deduplicating code used between parallel-build bundles #90

Open
alexpavlovich opened this issue Jan 1, 2019 · 1 comment

Comments

@alexpavlovich
Copy link

Explain the problem

Hi! I'm curious if there is a way to use SplitChunksPlugin with parallel-webpack. Current problem is: we have an array of different configurations that are built in parallel, but we also have duplicate code chunks in resulting bundles.

SplitChunksPlugin works great, but as builds are parallelized, we have multiple different "commons" chunks, each one for build.

Basically I want to create a single one "commons" bundle, that contains all common files (that are imported N or more times) between all parallel-built bundles, and those bundles should reference it.

Is it possible?

Expected Behaviour

Actual Behaviour

Steps to reproduce

Provide your webpack config

Provide your Environment details

  • Node version:

  • Operating System:

  • webpack version:

  • parallel-webpack version:

@pago
Copy link
Contributor

pago commented Jan 10, 2019

We don't have that at the moment because we don't intercept anything Webpack does.

If the list of modules that you want to be included is finite, you could consider using the DllPlugin instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants