I am using webpack to build the assets in production. The split chunking feature allows us to break big scripts into chunks. However the problem is that even though the scripts are deferred, webpagetest still shows they are render blocking:
The scripts already have the defer attributes.
Is it because defer is executing the scripts in order? Changing the defer to async seems to have solved the issue but I am trying to understand why it was render-blocking even though using defer.
The render blocking indicator comes directly from Chrome, and in this case it's a bug in Chrome due to a race condition. (You can find the Chromium bug here: https://chromium-review.googlesource.com/c/chromium/src/+/3596328)
Should be fixed in version 103, which comes out June 21st (https://chromestatus.com/roadmap).