-
Notifications
You must be signed in to change notification settings - Fork 518
Slow rebuilds after upgrading to webpack 2.1.0-beta.23 #325
Comments
Is this using angular2 hmr or just css HRM capabilities? @sokra if you can weigh in. |
It looks like he isn't using Patricks angular2-hmr or anything @TheLarkInn Just the basic stuff module.hot stuff:
@asadsahi You might need to update your module stuff to the latest from this repo, possibly it's not disposing correctly? I haven't tested this repo with wp2 beta yet, so I'm not positive.
|
@TheLarkInn as Mark mentioned it isn't using angular2 hmr, just the webpack's build in HMR capability. One thing I have clarified in the issue above is that fast rebuild is a webpack 1 based project, but slow rebuild is a webpack 2.1.0-beta.23 project. @MarkPieszak tried with above settings, but getting "platform is not defined". Strange thing with this project's HMR is that it detects the change very late, I mean: Initially, when we get: [HMR] connected After that, when code changes, [HMR] bundle rebuilding message appears after 2-3 seconds, and thats what's adding the delay in rebuilding I guess, not sure if that helps narrowing problem down. |
Sorry, I don't know. If you can supply repro steps in the form of a minimal set of changes to the default Yeoman-generated project output then I'd be happy to have a look, but there are too many changes in this project to pin down a cause. |
I'll close this as it's not an issue with the templates as they are (they use Webpack 1) but if you can identify a fault please reopen this with details. Hope that's OK! |
It actually works in this case, but don't do it |
@sokra It does work in Webpack 1. Is this a change in Webpack 2? |
no, it works without argument, but |
@SteveSandersonMS There are quite a number of changes compared to original generator, including catering of some breaking changes since Webpack 2 beta.23 e.g:
|
@sokra OK, replaced with direct references to |
…, because Webpack does static analysis that looks for this
@SteveSandersonMS what I sensed from your comments is that there is no tight dependency of Webpack 1 the only option in dotnet core spa generator which may have caused this? Means, it is safe to upgrade client build tools if someone have to? |
That's right. I'm not aware of anything locking you to Webpack 1 (but of course if you choose to upgrade, you will need to figure out solutions for any breaking changes introduced in Webpack 2). We'll make the switch to Webpack-2-by-default once the final version of Webpack 2 is released. |
@SteveSandersonMS Thanks for confirming that. Sure, in that case I think something wrong with the webpack 2 configuration somewhere which is starting the rebuild late. Unfortunately nothing visible for me right now, which can give clue to what webpack 2 is doing after I have made the change, Random guess though, it could be DLL usage not working the way expected. Because what I have also experimented is that with or without DLL, rebuild takes same amount of time. |
@sokra @TheLarkInn I think its around DLL configuration I have used with or without DLL, rebuild takes exactly same amount of time. Can you please have a look at DLL reference usage in vendor and main files |
Hi guys, in desperation, I have raised same issue on stackoverflow as well, to target wider help. Thanks |
Did beta.24 help at all? @asadsahi |
@MarkPieszak Didn't see beta.24 coming :) Upgraded to beta 24, but its exactly same time with rebuilds. |
Even webpack 2 beta.25 didn't make any difference. :( |
@sokra @TheLarkInn any update on this issue? Is there a known issue with DLL plugin in webpack 2? Is there a working example we can follow for DLL in webpack 2 if it is good to use today? |
Bingo!!!!!!!!!! The only reason for slow rebuilds was I changed ts-loader with awesome-typescript-loader. My goodness, tried every possible option I could to find out why rebuilds was slow. :( Apologies, as I blamed webpack 2, .net core spa project not supporting webpack 2 perhaps etc, but both projects don't have any reason for slow rebuilds. Now, question arose the claim made on awesome-typescript-loader repository here . Is this not valid any more or I have missed a particular option to set specifically to awesome-typescript-loader. Here are stats: With awesome-typescript-loader: @s-panferov any thoughts. In case someone wants to experiment, this is my sample project. after download webpack.config.js is using ts-loader, just change to awesome-typescript-loader at this line and see the difference. |
Maybe you'll have a better chance asking in their project. Would you mind On Mon, Nov 14, 2016 at 1:59 PM Asad Sahi notifications@github.com wrote:
|
@tinchou raised an issue as you've suggested. Not sure if typescript loaders in the context of .net core is a valid use case for them or not. |
there's nothing special in the compilation of the client app, it's a regular Angular application compiled using Webpack and the related loaders. |
Managed to upgrade asp.net core spa project to webpack 2.1.0-beta.23 and it is running fine. However, not sure if this issue is with webpack 2 or my project settings, hence pinging @SteveSandersonMS and @TheLarkInn to have a look at this project, where rebuild starts quite late and actually builds slow as well:
In order to run with upgraded version, please switch to rebuilds branch.
Here is the current rebuild stats on my machine:
My project: based on webpack 2.1.0-beta.23

Compared to a fresh asp.net core spa project created from yo: based on webpack 1
Difference is quite large.
Greatly appreciate the time to have a look at this issue and point out the possible cause of this.
The text was updated successfully, but these errors were encountered: