Skip to content

fix(docs-infra): correctly detect chunk load errors - #43088

Closed
gkalpak wants to merge 1 commit into
angular:masterfrom
gkalpak:fix-aio-sw-debug-info
Closed

gkalpak wants to merge 1 commit into
angular:masterfrom
gkalpak:fix-aio-sw-debug-info

Conversation

@gkalpak

@gkalpak gkalpak commented Aug 9, 2021

Copy link
Copy Markdown
Member

It seems that at some point (potentially with the switch to Webpack 5) Webpack started using the full chunk name (instead of just a numeric identifier) in ChunkLoadError messages. So the error messages changed from:

ChunkLoadError: Loading chunk 2 failed.

...to:

ChunkLoadError: Loading chunk src_app_something_some_module_ts failed.

This commit updates the regex that is used to detect such errors (in order to print ServiceWorker-related debug info) to correctly recognize both error message formats.

It seems that at some point (potentially with the switch to Webpack 5)
Webpack started using the full chunk name (instead of just a numeric
identifier) in `ChunkLoadError` messages. So the error messages changed
from:
```
ChunkLoadError: Loading chunk 2 failed.
```

...to:
```
ChunkLoadError: Loading chunk src_app_something_some_module_ts failed.
```

This commit updates the regex that is used to detect such errors (in
order to print ServiceWorker-related debug info) to correctly recognize
the new error message format.
@google-cla google-cla Bot added the cla: yes label Aug 9, 2021
@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer comp: docs-infra target: patch This PR is targeted for the next patch release type: bug/fix labels Aug 9, 2021
@ngbot ngbot Bot modified the milestone: Backlog Aug 9, 2021
@gkalpak
gkalpak marked this pull request as ready for review August 9, 2021 17:42
@gkalpak gkalpak removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 9, 2021
@mary-poppins

Copy link
Copy Markdown

@gkalpak gkalpak added the action: merge The PR is ready for merge by the caretaker label Aug 9, 2021
AndrewKushnir pushed a commit that referenced this pull request Aug 9, 2021
It seems that at some point (potentially with the switch to Webpack 5)
Webpack started using the full chunk name (instead of just a numeric
identifier) in `ChunkLoadError` messages. So the error messages changed
from:
```
ChunkLoadError: Loading chunk 2 failed.
```

...to:
```
ChunkLoadError: Loading chunk src_app_something_some_module_ts failed.
```

This commit updates the regex that is used to detect such errors (in
order to print ServiceWorker-related debug info) to correctly recognize
the new error message format.

PR Close #43088
@gkalpak
gkalpak deleted the fix-aio-sw-debug-info branch August 11, 2021 07:26
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes target: patch This PR is targeted for the next patch release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants