-
Notifications
You must be signed in to change notification settings - Fork 433
Publish/Deployment Doesnt work #413
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
Comments
That's strange, just tried it and Do you have dotnet core 2.0.0 installed, or the latest VS2017? |
Yes I have dotnet core 2.0 and using latest VS 2017 (15.3.3) with latest version of nodejs (v8.5.0). I also tried using ASP.Net SPA template and have issues with that as well (though its publish task completes successfully), Please take a look at aspnet/JavaScriptServices#292 (comment) |
Did increasing the |
I edited csproj file and updated below under PublishRunWebpack tag:
After this change, Aspnetcore-angular2-universal: |
Strange, we have synced up on webpack configurations except that we have scss and font-awesome setup here. I'm going to a few other improvements as well (such as switching away from awesome-typescript-loader etc), maybe those would help but still, it should work for either repo! Do you have a sample repo I could look at to try and investigate? |
Its a private repo, should I drop you an email with a sample? |
Can you please also confirm the size of files in these folders in your publish directory:
Does the size of files in |
The server bundle is in client app and the size of that one doesn't matter as there is no "load" on the server, it just contains everything it needs to serialize the app. Wwwroot is the client browser bunde(s). Problem is it could be a large number of things causing it, I don't have much time as I'm also still dealing with Irma aftermath 😓 My email is [email protected] I can try to take a look sometime if you have a private repo you can invite me to look at. |
Thank you so much @MarkPieszak , I really appreciate your quick reply and help despite being affected by Irma. Regarding the slow publish, I was able to resolve it by upgrading the Node version in Visual Studio 2017 (default is 5.x). I also upgraded Webpack to the latest version. Though I am still having the timeout problem, I enabled the log in IIS and found that it was throwing I investigated little further and found that when using Lazy loading and when we do publish the publish process doesn't generate the bundles for the lazy loaded modules for server (i.e. in ClientApp\dist folder). You can try below to reproduce:
In the Publish directory examine the files in Normally, when we have already debug the application, it generate the bundles in Probably its something related to this: angular/universal#741 (comment) BTW, cant we integrate Angular CLI to build production bundles as well? Angular CLI will have support for Lazy Loading for Universal soon (https://github.com/angular/angular-cli/wiki/stories-universal-rendering#caveats). And in my opinion bundles produced by Angular CLI are very well optimized and smaller in size. |
which commands does dotnet publish run exactly? Does it run the webpack production builds (if yes, how does it know what your weback prod commands are) ? Been trying to figure out just want dotnet publish does! (UPDATE: Nevermind I see it in the csproj) |
@naveedahmed1 try the code from the pull request #410 It has the npm dependencies updated to latest, and lazy loading works as expected. |
@davidsekar are you sure commenting out The bundles generated for server side after commenting out @MarkPieszak mentioned above |
@naveedahmed1 - UglifyPlugin is already ON for client bundles in production mode, which is pretty effective. Not sure if
App Then using commonchunks plugin would prove useful, It automatically moves ngx-bootstrap to an asynchronous common chunk. In current repo setup, there is just a single lazy/async loaded module. It doesn't help.
Possible optimizations: b) Remove duplicated bootstrap css styles. |
I downloaded this repo, restored the npm dependencies and then tried to publish both using
VS2017
anddotnet publish
command but none of these works.Its keeps stuck in publish process for hours, with CPU utilization of 100% where node is taking over 90% resources.
The text was updated successfully, but these errors were encountered: