-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Remove polyfills file #23938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove polyfills file #23938
Conversation
70cdde2 to
4f20da4
Compare
|
Will it still be possible to define Zone.JS flags before importing Zone.JS? |
4f20da4 to
03b7de3
Compare
You can still provide those in a |
03b7de3 to
bfe4fde
Compare
If I remember correctly, the order of imports matters here. Flags should be defined before zone.js import. |
|
You can order the files to imports as you'd needed. Example: |
bf3813e to
f31a70e
Compare
|
Thanks a lot for answering :) |
202c566 to
dfeaba8
Compare
ad23fb8 to
e634ff7
Compare
packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json
Outdated
Show resolved
Hide resolved
| const polyfillsEntryPoint = options.polyfills && path.join(workspaceRoot, options.polyfills); | ||
|
|
||
| // Currently esbuild do not support multiple files per entry-point | ||
| const [polyfillsEntryPoint, ...remainingPolyfills] = normalizePolyfills( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the path resolving step be skipped here? The absolute paths will end up in the sourcemaps.
esbuild should be able to resolve the relative paths directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per off-line convo, lets do this in a follow up
1504352 to
5341730
Compare
…builders to support an array of module specifiers This is the ground work to be able to remove the `polyfills.ts` file which today is primarily used to add `zone.js`. Usage examples: ```js polyfills: ['zone.js'], polyfills: ['zone.js', 'zone.js/testing', 'src/polyfills.ts'], ```
With this change we drop the `polyfills.ts` from new application projects and add the polyfills directly in the `angular.json`. This is possible as now the `polyfills` option accept an array of module specifiers. This change also fixes another open issue (angular#14432) which was caused by the missing polyfills file in the library test setup. Closes angular#14432
5341730 to
1c80211
Compare
With the recent changes in the Angular CLI (angular/angular-cli#23938) the polyfills option accepts module path that are resolved using Node module resolution. Also, the polyfills.ts file is no longer generated by default. This commit changes the way on how the polyfill is added to the projects.
#47569) With the recent changes in the Angular CLI (angular/angular-cli#23938) the polyfills option accepts module path that are resolved using Node module resolution. Also, the polyfills.ts file is no longer generated by default. This commit changes the way on how the polyfill is added to the projects. PR Close #47569
angular#47569) With the recent changes in the Angular CLI (angular/angular-cli#23938) the polyfills option accepts module path that are resolved using Node module resolution. Also, the polyfills.ts file is no longer generated by default. This commit changes the way on how the polyfill is added to the projects. PR Close angular#47569
angular#47569) With the recent changes in the Angular CLI (angular/angular-cli#23938) the polyfills option accepts module path that are resolved using Node module resolution. Also, the polyfills.ts file is no longer generated by default. This commit changes the way on how the polyfill is added to the projects. PR Close angular#47569
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |


feat(@angular-devkit/build-angular): amend
polyfillsoption in all builders to support an array of module specifiersThis is the ground work to be able to remove the
polyfills.tsfile which today is primarily used to addzone.js.Usage examples:
feat(@schematics/angular): drop
polyfills.tsfile from new templatesWith this change we drop the
polyfills.tsfrom new application projects and add the polyfills directly in theangular.json. This is possible as now thepolyfillsoption accept an array of module specifiers.This change also fixes another open issue (#14432) which was caused by the missing polyfills file in the library test setup.
Closes #14432