nx/docs/generated/packages/angular/migrations/add-localize-polyfill-to-targets.json
Isaac Mann 8b11d8bfe5
docs(core): add migrations docs for 20.x (#30186)
Adds migration docs for all 20.0 through 20.4 migrations
2025-02-27 15:58:41 -05:00

16 lines
1.6 KiB
JSON

{
"name": "add-localize-polyfill-to-targets",
"cli": "nx",
"version": "20.2.0-beta.5",
"requires": { "@angular/core": ">=19.0.0" },
"description": "Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.",
"factory": "./src/migrations/update-20-2-0/add-localize-polyfill-to-targets",
"implementation": "/packages/angular/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular",
"schema": null,
"type": "migration",
"examplesFile": "#### Add Localize Polyfill to Targets\n\nAdd the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.\n\n#### Sample Code Changes\n\nAdd the `@angular/localize/init` polyfill to any of these executors:\n\n- `@angular/build:application`\n- `@angular-devkit/build-angular:application`\n- `@nx/angular:application`\n- `@angular-devkit/build-angular:browser-esbuild`\n- `@nx/angular:browser-esbuild`\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"apps/app1/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@angular/build:application\",\n \"options\": {\n \"localize\": true\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"apps/app1/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@angular/build:application\",\n \"options\": {\n \"localize\": true,\n \"polyfills\": [\"@angular/localize/init\"]\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
}