Version 13.2.2 breaks production build when using dynamic imports #22662
Labels
area: @angular-devkit/build-angular
devkit/build-angular:browser
devkit/build-angular:server
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 13.2.1
Description
When running a production build with version 13.2.2, it fails with an error after chunk generation completes.
This relates to using a dynamic import of a json file.
The error is:
An unhandled exception occurred: Cannot read properties of undefined (reading 'name')
(see below for extended error)ng serve does not have this problem.
🔬 Minimal Reproduction
import(`../../../../../assets/animations/${this.animation}.json`).then(animation => {
Cannot read properties of undefined (reading 'name')
extractIdentifiedModule
thedirectory
andpackageJson
are undefinedThe problem is caused by license-webpack-plugin@4.0.1, specifically the changes in commit xz64/license-webpack-plugin@55dd3f8
Also reported as bug to
license-webpack-plugin
: xz64/license-webpack-plugin#119🔥 Exception or Error
Error
angular-errors.log
:🌍 Your Environment
The text was updated successfully, but these errors were encountered: