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
[Feature] 💥 Upgrade to webpack 4 🎉👍 #1973
Comments
Looks like will have to wait until html-webpack-plugin is upgraded. Might have to upgrade some others as well, but this one is crucial. |
jantimon/html-webpack-plugin#860 Looks like they are already working on it. Maybe you can test further with the alternative: npm install -D webpack-contrib/html-webpack-plugin |
It fails to install for me. Runs some specs and throws lots of exceptions. May be because we're using corporate npm registry and it doesn't have an access to webpack-contrib/ . |
There are a couple of packages which needs patches. szrenwei/inline-manifest-webpack-plugin#10 and numical/script-ext-html-webpack-plugin#41. Patches are obvious and I used patch-package for now. |
FYI, Angular CLI (next beta) has been updated for webpack 4.0 |
@sherlock1982 we can use |
I did a quick and dirty upgrade to the latest version of webpack (4.1.1). It's working, the build is much faster, but unfortunately I had to disable html-elements-plugin which exists as part of this repo (angular-starter\config\html-elements-plugin\index.js) since it's not compatible and I'm lacking both knowledge and time to upgrade it. My code changes are uploaded into the branch >> here <<. For now I'm not going to create PR for it. If someone is willing to look into it, please feel free. |
@lanovoy why you removed the Is there any reason? I think chunks are helpful, isn't? for I'm not sure why you removed the There are my notes (or questions) currently. Edit: |
The |
@kuhnroyal thanks, but at least add some context to your link, like a TL;DR version. |
Yes, those plug-ins were removed as they are listed as not needed for
webpack anymore. Webpack does the same as they do out of the box now.
вс, 18 марта 2018 г., 15:39 Al-Mothafar Al-Hasan <notifications@github.com>:
… @kuhnroyal <https://github.com/kuhnroyal> thanks, but at least add some
context to your link, like a TL;DR version.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1973 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFWb43vfihD5g3_aR9qPt7abYOAOva3pks5tfnGXgaJpZM4SSSSW>
.
|
ngtools 1.10.0 (and 1.10.2) are technically not compatible with the Webpack
4, but you may be right and it's just a cosmetic incompatibility... Feel
free to verify yourself.
вс, 18 марта 2018 г., 15:54 Maksym Lanovyi <lanovoy@gmail.com>:
… Yes, those plug-ins were removed as they are listed as not needed for
webpack anymore. Webpack does the same as they do out of the box now.
вс, 18 марта 2018 г., 15:39 Al-Mothafar Al-Hasan ***@***.***
>:
> @kuhnroyal <https://github.com/kuhnroyal> thanks, but at least add some
> context to your link, like a TL;DR version.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1973 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AFWb43vfihD5g3_aR9qPt7abYOAOva3pks5tfnGXgaJpZM4SSSSW>
> .
>
|
@lanovoy I'll do verify later for sure, I just did code review and was looking for clarifications before I reinvent the wheel, sadly not have enough time to do that by myself, so I appreciate your efforts. |
Awesome! Thank you
вс, 18 марта 2018 г., 16:58 Al-Mothafar Al-Hasan <notifications@github.com>:
… @lanovoy <https://github.com/lanovoy> I'll do verify later for sure, I
just did code review and was looking for clarifications before I reinvent
the wheel, sadly not have enough time to do that by myself, so I appreciate
your efforts.
If I have fixes I'll do that on the branch that you created.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1973 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFWb409M3mhnEyy0IwD4DdmpIwn_DrT0ks5tfoQdgaJpZM4SSSSW>
.
|
One another outstanding issue with the webpack 4 conversion in the branch created by me, is that there is some dependency to webpack 3.x still somewhere (likely in the plugins npm packages). After npm install you will find both webpack versions in the node_modules. |
@lanovoy let me look into it. I am not expert but I can try. |
@lanovoy I checked your code. use |
I was thinking about postponing this, until Angular 6 is released it should be on 4th of April |
I agree, it would be the best to wait until Angular 6 release. I will
create an issue to upgrade shipped with this repo plug-in, tho...
пн, 19 марта 2018 г., 15:38 Al-Mothafar Al-Hasan <notifications@github.com>:
… I was thinking about postponing this, until Angular 6 is released it
should be on 4th of April
https://github.com/angular/angular/blob/master/docs/RELEASE_SCHEDULE.md
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1973 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFWb404QX0TDjuFhNjEZycp65g6CS0rwks5tf8LwgaJpZM4SSSSW>
.
|
Additionally in my branch there is a problem with the karma test runner it seems so. |
I agree with waiting for angular 6 release decision. I will try to update html-elements-plugin I don't know how to update but will give a try. |
@lanovoy have you checked HMR reload after code updating? Because after CommonsChunkPlugin removing it was broken to me. |
@Yizhachok Nope, didn't test HMR. You can clone from my branch and verify yourself, tho. |
@sherlock1982 Thanks. I suppose we're going to wait for Angular 6 release in any case, so hopefully jasmine-core will be updated by that time as well... |
Heads up, there are few issues with the current angular-starter test webpack + ts settings when using packages webpack@4 + typescript @2.6.2 + awesome-typescript-loader@5. More info here. |
Looks like Angular 6 release is postponed again. RC3 just got released. Many really sweet features with Angular 6, so upgrading to it should be pretty much a priority for this starter project. |
I checked out this branch and got it working https://github.com/gdi2290/angular-starter/tree/feature/migrate-to-webpack4 |
Bump, Angular 6.0 is out. |
@konuch We were waiting for angular 6 release. Yes we need to test our |
@govi2010 I did a quick skim of |
It was merged into master. Thanks for the help people! PR for reference #2019 |
I'm submitting a ...
[ ] bug report
[X] feature request
[ ] question about the decisions made in the repository
Do you want to request a feature or report a bug?
Feature: Upgrade to webpack 4
What is the current behavior?
Currently, it is Webpack 3
What is the expected behavior?
Use Webpack 4 as it contains big improvements
What is the motivation / use case for changing the behavior?
As you can see the big features and changes in release notes: https://github.com/webpack/webpack/releases/tag/v4.0.0
🎉 💃
The text was updated successfully, but these errors were encountered: