Bug Report
Affected Package
Not sure, but maybe @ngtools/webpack.
Is this a regression?
Yes, the previous version in which this bug was not present was: 11.0.9
Description
ng serve doesn't work when a file replacement containing a require is outside the project's workspace folder.
Minimal Reproduction
Please see the following repositories for reproduction:
Points of interests in the reproduction: angular.json file (fileReplacements) and app.module.ts.
Your Environment
Angular Version: 12.1.0
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.1.0
Node: 14.17.0
Package Manager: npm 6.14.13
OS: linux x64
Angular: 12.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1201.0
@angular-devkit/build-angular 12.1.0
@angular-devkit/core 12.1.0
@angular-devkit/schematics 12.1.0
@schematics/angular 12.1.0
rxjs 6.6.7
typescript 4.3.4
Anything else relevant?
I think I know how to fix it, I'm more interested in why this is happening. Was this an intended breaking change? Should the previous behavior be restored?
Bug Report
Affected Package
Not sure, but maybe
@ngtools/webpack.Is this a regression?
Yes, the previous version in which this bug was not present was:
11.0.9Description
ng servedoesn't work when a file replacement containing arequireis outside the project's workspace folder.Minimal Reproduction
Please see the following repositories for reproduction:Points of interests in the reproduction:
angular.jsonfile (fileReplacements) andapp.module.ts.Your Environment
Angular Version: 12.1.0
Anything else relevant?
I think I know how to fix it, I'm more interested in why this is happening. Was this an intended breaking change? Should the previous behavior be restored?