mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 12:34:32 +08:00
With this commit when running a build with sourcemaps enabled we enable Node.js Sourcemap support for stack traces. See: https://nodejs.org/dist/latest/docs/api/cli.html#--enable-source-maps for more information about this feature. Before ``` ERROR ReferenceError: window is not defined at new _AppComponent (file:///chunk-HFZN2HE2.mjs:41631:19) at NodeInjectorFactory.AppComponent_Factory [as factory] (file:///chunk-HFZN2HE2.mjs:41635:12) at getNodeInjectable (file:///chunk-HFZN2HE2.mjs:6104:38) at createRootComponent (file:///chunk-HFZN2HE2.mjs:10446:31) at ComponentFactory.create (file:///chunk-HFZN2HE2.mjs:10348:19) at _ApplicationRef.bootstrap (file:///chunk-HFZN2HE2.mjs:13247:40) at file:///chunk-HFZN2HE2.mjs:12938:20 at _ZoneDelegate.invoke (file:///chunk-HFZN2HE2.mjs:320:158) at Object.onInvoke (file:///chunk-HFZN2HE2.mjs:8562:25) at _ZoneDelegate.invoke (file:///chunk-HFZN2HE2.mjs:320:46) ``` Now ``` ERROR ReferenceError: window is not defined at constructor (/usr/xxxx/src/app/app.component.ts:16:17) at NodeInjectorFactory.AppComponent_Factory (/usr/xxxx/src/app/app.component.ts:17:3) at getNodeInjectable (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:4166:38) at createRootComponent (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:14064:31) at ComponentFactory.create (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:13931:19) at _ApplicationRef.bootstrap (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:30650:40) at <anonymous> (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:30163:20) at _ZoneDelegate.invoke (/usr/xxxx/node_modules/zone.js/fesm2015/zone-node.js:344:158) at Object.onInvoke (/usr/xxxx/node_modules/@angular/core/fesm2022/core.mjs:10964:25) at _ZoneDelegate.invoke (/usr/xxxx/node_modules/zone.js/fesm2015/zone-node.js:344:46) ``` Closes #26013