Closed nchangnon closed 3 years ago
Duplicate of https://github.com/angular/angular-cli/issues/19550
Addressed in ~0.1101.0-next.2
, to try out the prerelease run ng update @angular/cli --next
@alan-agius4 This bug is present in 0.1101.0-next.2 , see the 'Your Environment' section. This is different than #19550 which did build successful but just had issues with running locally. I can now run locally (ng serve) but can no longer do a production build (ng build --prod==true)
I actually managed to replicate it. For some reason I wasn't before when I used the latest version of Webpack. It appears to be caused by the license-webpack-plugin
plugin. Disabling license extraction doesn't cause an error.
ng build --prod --no-extract-licenses
Closing as it's currently fixed on master branch and will be part of the 11.1 release.
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.
π Bug report
Command (mark with an
x
)Is this a regression?
This works when not opting-in to Webpack 5.
Description
A clear and concise description of the problem... -->If scripts are specified in the build options to be included globally,
ng build --prod=true
fails to build.π¬ Minimal Reproduction
create a new angular project
opt-in to webpack 5 :
"resolutions": { "webpack": "5.4.0" }
add an external dependency such as jquery to package.json (using yarn)
yarn add jquery
update angular.json to include the new global dependency
ng build --prod=true
π₯ Exception or Error
π Your Environment
Anything else relevant?