Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to webpack 4 #462

Merged
merged 13 commits into from
Apr 15, 2020
Merged

Conversation

julen
Copy link
Contributor

@julen julen commented Apr 14, 2020

Still WIP because some jQuery plugin dependencies are not playing well with the new config...

Also updates to Babel 7 along the way.

Fixes #449.

These plugins are now automatically loaded based on the mode.
This has been replaced by the `SplitChunksPlugin`. With the new
configuration we try to resemble the configuration we previously had
with `CommonChunksPlugin`, i.e. all modules imported from `vendor/` and
`node_modules/` directories will be split in a separate 'vendors' chunk.
Because we include multiple entry points in a page (e.g. the editor
includes the 'common' and 'editor' entry points), we want chunks to be
initialized only once, otherwise some scripts will cease to work
(jquery-select2 for example).

According to the webpack docs:
> Imported modules are initialized for each runtime chunk separately, so
> if you include multiple entry points on a page, beware of this behavior.
> You will probably want to set it to single or use another configuration
> that allows you to only have one runtime instance

Refs.
  https://webpack.js.org/configuration/optimization/#optimizationruntimechunk
@julen julen force-pushed the feature/webpack-upgrade-449 branch from 68878d1 to 030e5f1 Compare April 15, 2020 11:31
@julen julen force-pushed the feature/webpack-upgrade-449 branch from 64fe90c to a9810dd Compare April 15, 2020 13:05
@julen julen changed the title [WIP] Upgrade to webpack 4 Upgrade to webpack 4 Apr 15, 2020
@julen julen merged commit a9810dd into serge-community:master Apr 15, 2020
@julen julen deleted the feature/webpack-upgrade-449 branch April 15, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Webpack
1 participant