Angular: Fix for renamed method in angular 13.1 #17032
Merged
+6
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #16977
Broken build when on Angular v.
13,1
--> comment: #16977 (comment)
Quoting comment:
The problem is that in angular 13.1 the function
getTypescriptWorkerPlugin
changed names togetDevServerConfig
I was able to get it running by replacing all occurances of
getTypescriptWorkerPlugin
What I did
Renamed the method to the new name - it's a bit ugly because it's using a ternary to see if old one exists - if not use new one. More proper way would be to check Angular version from lock file I guess...
How to test
Storybook for Angular
13.1
can now run without throwing the errorTypeError: getTypescriptWorkerPlugin is not a function
.Disclaimer
I am not sure if we would need to add an extra check of the Angular version that's actually installed..