Webpack-cli: Feature: Migrate should move CommonsChunkPlugin to SplitChunksPlugin

Created on 10 Apr 2018  路  8Comments  路  Source: webpack/webpack-cli

Do you want to request a feature or report a bug?
Feature.

What is the current behavior?
At the moment migrate does nothing when it encounters CommonsChunkPlugin

What is the expected behavior?
It should migrate to SplitChunksPlugin

If this is a feature request, what is motivation or use case for changing the behavior?
CommonsChunkPlugin is now deprecated in webpack v4 and migrate, as its objective, should opt in in favor of SplitChunksPlugin

Feature Help Wanted Migrate

All 8 comments

I can pick this up. :hand:

I think apart from changing name, there are some defaults as well that CommonsChunkPlugin was doing.

WDYT? @ematipico @montogeek

Great! That was quick

No, just changing the name is not enough. It's a complete different section of the configuration

https://webpack.js.org/plugins/split-chunks-plugin/#optimization-splitchunks

@dhruvdutt First change is its name, second step is play a lot with all its options until it fits CCP behaviour, if you discover something new share it on webpack.js.org docs!

@ematipico this was already merged #399 , we can close

Are we sure? I am looking better at the PR, the changes were around different plugins.
Here the work is actually different because we have to migrate and existing CommonsChunkPlugin (I don't see any test around it).

@dhruvdutt was going to do that.

Closed this by accident, a migration for commonsChunk would need to be added, as it has changed in newer versions of webpack. Nice catch, thanks!

I'm caught up with some university assignment until next week.
@ematipico @PlayMa256 @bitpshr Please feel free to catch this up if it's blocking next release. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r00nscapenab picture r00nscapenab  路  4Comments

luillyfe picture luillyfe  路  4Comments

heyalbert picture heyalbert  路  3Comments

larkintuckerllc picture larkintuckerllc  路  5Comments

evenstensberg picture evenstensberg  路  5Comments