-
Notifications
You must be signed in to change notification settings - Fork 683
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
WIP (DO NOT MERGE) Migrate to Webpack 4 and webpack-serve #167
Conversation
WIP about to merge webpack-serve WIP switch to webpack-serve WIP bugfixing webpack-serve branch
Signed-off-by: James Zetlen <[email protected]>
Signed-off-by: James Zetlen <[email protected]>
Checking in this WIP (which is not presently working) because it contains concepts we will want to bring forward, but implemented in a way that is probably unsustainable. In order: - Updated npm scripts so that common tasks were easier from package root - Began effort to switch from Magento rendered app shell to middle-tier-rendered app shell. - Began with HtmlWebpackPlugin and its extensions. - Found incompatibilities with `webpack-dev-server` in desired approach. - Began switch to `webpack-serve` over the unmaintained `webpack-dev-server`. - Began switch to Webpack 4 to maintain compatibility with `webpack-serve`. _(Maybe you see where this is going.)_ - Switched from deprecated CommonsChunkPlugin to `splitChunks` configuration. - Tweaked `splitChunks` configuration and HtmlWebpackPlugin configuration to fix a topological sort issue caused by MagentoRootComponentsPlugin. - Refactored MagentoRootComponentsPlugin to be compatible with Webpack 4 compilation API. (Thanks to @adrien-louis-r whose commits I cherry-picked, with attribution, to begin work on the plugin.) - Discovered root components are fundamentally incompatible with Webpack4 with splitChunks in use. - Determined that the RootComponents manifest strategy might not be necessary at build time, if the middle tier specification can instead select entry points based on preload. - Decided to "park" this webpack-dev-mode upgrade effort for now. Opened this as a PR so that it's easy to comment on and visible to collaborators and community, but please do not merge this. It would be very bad to merge this.
Generated by 🚫 dangerJS |
No longer relevant due to #248 and oncoming loadable. |
This PR is a:
[ ] New feature
[x] Enhancement/Optimization
[ ] Refactor
[ ] Bugfix
[ ] Test for existing code
[ ] Documentation
Summary
WIP (DO NOT MERGE): New dev server concept
Checking in this WIP (which is not presently working) because it
contains concepts we will want to bring forward, but implemented in a
way that is probably unsustainable.
In order:
root
middle-tier-rendered app shell.
webpack-dev-server
in desiredapproach.
webpack-serve
over the unmaintainedwebpack-dev-server
.webpack-serve
. (Maybe you see where this is going.)splitChunks
configuration.
splitChunks
configuration and HtmlWebpackPluginconfiguration to fix a topological sort issue caused by
MagentoRootComponentsPlugin.
compilation API. (Thanks to @adrien-louis-r whose commits I
cherry-picked, with attribution, to begin work on the plugin.)
with splitChunks in use.
necessary at build time, if the middle tier specification can instead
select entry points based on preload.
Additional information
Opened this as a PR so that it's easy to comment on and visible to
collaborators and community, but please do not merge this. It would be
very bad to merge this.