-
Notifications
You must be signed in to change notification settings - Fork 12k
Auto include @angular/platform-server/init
and @angular/localize/init
#24032
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
Merged
alan-agius4
merged 2 commits into
angular:main
from
alan-agius4:auto-import-server-and-localize-init
Oct 12, 2022
Merged
Auto include @angular/platform-server/init
and @angular/localize/init
#24032
alan-agius4
merged 2 commits into
angular:main
from
alan-agius4:auto-import-server-and-localize-init
Oct 12, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clydin
approved these changes
Oct 11, 2022
packages/angular_devkit/build_angular/src/webpack/configs/common.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/build_angular/src/webpack/configs/common.ts
Outdated
Show resolved
Hide resolved
…init` when found in `types` With this change we remove the need to include the `@angular/localize/init` package as polyfills in `polyfills.ts`, `angular.json` and `main.server.ts`. Instead when `@angular/localize/init` is included in the TypeScript `types` we add this as entry-point. The `@angular/localize/init` will be added as a parts of the `types` array in a seperate PR to address angular/angular#47677 which is caused by the fact that `@angular/localize/init` types are no longer imported when `@angular/localize/init` is added as a polyfill in `angular.json`.
…server/init` during server builds This changes removes the need to import `@angular/platform-server/init` in the `main.server.ts` instead we now include this as an entry-point when we are bundling as server bundle.
f5a2384
to
02ce4d8
Compare
alan-agius4
added a commit
to alan-agius4/angular
that referenced
this pull request
Oct 14, 2022
Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below: ``` Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'. ``` With the recent changes in the CLI (angular/angular-cli#24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint. This change also exposes the `$localize` method as a global when importing `@angular/localize`. Closes angular#47677
dylhunn
pushed a commit
to angular/angular
that referenced
this pull request
Oct 17, 2022
… 15 (#47763) Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below: ``` Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'. ``` With the recent changes in the CLI (angular/angular-cli#24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint. This change also exposes the `$localize` method as a global when importing `@angular/localize`. Closes #47677 PR Close #47763
dylhunn
pushed a commit
to angular/angular
that referenced
this pull request
Oct 17, 2022
… 15 (#47763) Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below: ``` Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'. ``` With the recent changes in the CLI (angular/angular-cli#24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint. This change also exposes the `$localize` method as a global when importing `@angular/localize`. Closes #47677 PR Close #47763
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
feature
Issue that requests a new feature
target: minor
This PR is targeted for the next minor release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(@angular-devkit/build-angular): auto include
@angular/platform-server/init
during server buildsThis changes removes the need to import
@angular/platform-server/init
in themain.server.ts
instead we now include this as an entry-point when we are bundling as server bundle.feat(@angular-devkit/build-angular): auto include
@angular/localize/init
when found intypes
With this change we remove the need to include the
@angular/localize/init
package as polyfills inpolyfills.ts
,angular.json
andmain.server.ts
.