Fix for 2 years old issue StaticInjectorError error when --bundle-dependencies=all
#15498
Milestone
--bundle-dependencies=all
#15498
🐞 Bug report
This is about the issue reported at #8616 .
Its a 2 years old issue with still no fix from Angular team. Since that issue has been closed, I am creating a new issue.
When we set
"bundleDependencies": "all",
inangular.json
file, which we normally do for SSR/Universal apps (specifically for .net/.net core applications its required), and also have"optimization": true,
. The generated bundle throws below error:I believe the reason of this is the compress and mangle option of
terser
plugin.If we set
--keep-fnames
forterser
plugin for server bundles or when using"bundleDependencies": "all"
, this issue can be resolved.I have verified this and it works as mentioned here #8616 (comment)
The text was updated successfully, but these errors were encountered: