Serve very long initial page load from 1.0.0.13 to 1.0.1.0
See original GitHub issueCurrent Behavior
When upgrading from NX 1.0.0.13 to 1.0.1.0, nx serve
is very slow. Some basic javascript files take minutes to load on localhost, making it seem it doesn’t load at all. When nx serve
has run and I’ve waited the full 5 minutes for a specific file to load and then clear cache and reload, it’s instant.
I’m coming from 9.5.1
and tried to upgrade to 1.0.3.1
, everything works except nx serve
. It builds fine (console output is the same), but opening the page in the browser doesn’t work. Building and hosting it in IIS works fine.
Expected Behavior
As in previous versions, when I run nx serve
, opening the page in the browser is almost instant.
Steps to Reproduce
I still need to check if I can create a minimum reproducable case, but that will take a few more days, maybe someone already knows something I might have missed, or how to help debug this, that would be great.
For me, it was upgrading NX from 9.5.1
to 1.0.3.1. I've isololated it further to be
@nrwl/webfrom
1.0.0.13to
1.0.1.0. In the meantime, I downgraded that specific package to
1.0.0.13` and everything seems to be working, but it would be best to not be stuck on that version.
I’ve checked this comparison to see if anything obvious stands out. I see copy-webpack-plugin
was upgraded to a new version ( #3514). We use a custom webpack.config.js
to load some more stuff like fonts, allow for CSS modules and change the default output to include hashes for cache-busting purposes. There’s also a change in the code for that with the assets, we have quite a bunch of asset globs which might also be affected (#3328). Though it seems strange as those assets are deployed using nx build
Failure Logs
Here’s the screenshot of it loading more than 5 minutes and my custom web.config.js
.
Files.zip
Environment
OS; Windows 10 Node & NPM; 14.14.0 & 6.14.8 (upgraded to latest while debugging) Notable other frameworks; React and single-spa
Not working; nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 10.2.1 @nrwl/cypress : 10.3.1 @nrwl/eslint-plugin-nx : 10.3.1 @nrwl/express : Not Found @nrwl/jest : 10.3.1 @nrwl/linter : 10.3.1 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : 10.3.1 @nrwl/schematics : Not Found @nrwl/tao : 10.2.1 @nrwl/web : 10.3.1 @nrwl/workspace : 10.3.1 typescript : 4.0.3
Working when downgrading @nrwl/web; nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 10.2.1 @nrwl/cypress : 10.3.1 @nrwl/eslint-plugin-nx : 10.3.1 @nrwl/express : Not Found @nrwl/jest : 10.3.1 @nrwl/linter : 10.3.1 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : 10.3.1 @nrwl/schematics : Not Found @nrwl/tao : 10.2.1 @nrwl/web : 10.0.13 @nrwl/workspace : 10.3.1 typescript : 4.0.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Thank you @CookieNick ! I will wait until you have the reproducible case available, and then I will try my best to solve your issue! 😃
Hi!
Thanks for getting back to me. I was working on a reproduceable case, but work got in the way and the workaround was fine for a few weeks. There’s a lot of stuff coming together which makes it a little time consuming, as I’m working with a lot of customized stuff too. I’ll look into it again soon.
You completely understand my steps, that’s great. As you’ve described is exactly what I’ve done, though at first I was up/downgrading all of NX and in the end just the
@nrwl/web
package. I tried to make the title as clear as I could, but I’m happy to take suggestions to make it clearer for you and the rest of the team!