🐞 bug report
Affected Package
The issue is caused by package zone.js
Is this a regression?
no
Description
zone.js does not ship an esm2015 distribution that is discoverable by tooling: see https://unpkg.com/browse/[email protected]/package.json (there is no module property in package.json pointing to dist/zone-evergreen.js (the ESM2015 file)
We created zone-evergreen.js as part of the pre-requisites for the differential loading story in v8, but rather than changing the zone.js layout and requiring a migration for all Angular apps we kept the deep import into zone.js/dist/zone in polyfills.ts file:
https://github.com/angular/angular-cli/blob/5376a8b1392ac7bd252782d8474161ce03a4d1cb/packages/schematics/angular/application/files/src/polyfills.ts.template#L55-L58
and instead implemented a custom resolution alias for es2015 polyfills:
https://github.com/angular/angular-cli/blob/878e4473e0a8517f8eab529ac71f0d6e8a454447/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts#L114
We should clean up the package layout, roll out a migration for existing Angular CLI apps and remove the hack/custom resolution from the CLI.
🌍 Your Environment
Angular Version:
Angular CLI: 9.0.0-rc.11
Node: 12.14.1
OS: linux x64
Angular: 9.0.0-rc.11
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.11
@angular-devkit/build-angular 0.900.0-rc.11
@angular-devkit/build-optimizer 0.900.0-rc.11
@angular-devkit/build-webpack 0.900.0-rc.11
@angular-devkit/core 9.0.0-rc.11
@angular-devkit/schematics 9.0.0-rc.11
@angular/cdk 9.0.0-rc.8
@angular/material 9.0.0-rc.8
@ngtools/webpack 9.0.0-rc.11
@schematics/angular 9.0.0-rc.11
@schematics/update 0.900.0-rc.11
rxjs 6.5.3
typescript 3.7.4
webpack 4.41.2
Anything else relevant?
The solution will likely mean that zone.js will need to be restructured to match the simplified APF format with each file under dist/ being a directory with a fake package.json file similar to how https://unpkg.com/browse/@angular/[email protected]/testing/package.json works.
🐞 bug report
Affected Package
The issue is caused by package zone.jsIs this a regression?
noDescription
zone.js does not ship an esm2015 distribution that is discoverable by tooling: see https://unpkg.com/browse/[email protected]/package.json (there is no module property in package.json pointing to
dist/zone-evergreen.js(the ESM2015 file)We created
zone-evergreen.jsas part of the pre-requisites for the differential loading story in v8, but rather than changing the zone.js layout and requiring a migration for all Angular apps we kept the deep import into zone.js/dist/zone in polyfills.ts file:https://github.com/angular/angular-cli/blob/5376a8b1392ac7bd252782d8474161ce03a4d1cb/packages/schematics/angular/application/files/src/polyfills.ts.template#L55-L58
and instead implemented a custom resolution alias for es2015 polyfills:
https://github.com/angular/angular-cli/blob/878e4473e0a8517f8eab529ac71f0d6e8a454447/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts#L114
We should clean up the package layout, roll out a migration for existing Angular CLI apps and remove the hack/custom resolution from the CLI.
🌍 Your Environment
Angular Version:
Anything else relevant?
The solution will likely mean that zone.js will need to be restructured to match the simplified APF format with each file under
dist/being a directory with a fake package.json file similar to how https://unpkg.com/browse/@angular/[email protected]/testing/package.json works.