-
Notifications
You must be signed in to change notification settings - Fork 26
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
julen
merged 13 commits into
serge-community:master
from
julen:feature/webpack-upgrade-449
Apr 15, 2020
Merged
Upgrade to webpack 4 #462
julen
merged 13 commits into
serge-community:master
from
julen:feature/webpack-upgrade-449
Apr 15, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
force-pushed
the
feature/webpack-upgrade-449
branch
from
April 15, 2020 11:31
68878d1
to
030e5f1
Compare
`require.ensure()` was Webpack's old way for dynamic imports. It now supports ES dynamic imports. Note however the Webpack-specific chunk name is provided as an inline comment. Refs. https://webpack.js.org/api/module-methods/#magic-comments
julen
force-pushed
the
feature/webpack-upgrade-449
branch
from
April 15, 2020 13:05
64fe90c
to
a9810dd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.