Skip to content

Commit 0f066f0

Browse files
feat: migrate templates to Angular v21
Signed-off-by: David Dal Busco <[email protected]>
1 parent e004103 commit 0f066f0

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

templates/angular-example/angular.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"prefix": "app",
1616
"architect": {
1717
"build": {
18-
"builder": "@angular-devkit/build-angular:application",
18+
"builder": "@angular/build:application",
1919
"options": {
2020
"outputPath": "dist/angular-example",
2121
"index": "src/index.html",
@@ -58,7 +58,7 @@
5858
"defaultConfiguration": "production"
5959
},
6060
"serve": {
61-
"builder": "@angular-devkit/build-angular:dev-server",
61+
"builder": "@angular/build:dev-server",
6262
"configurations": {
6363
"production": {
6464
"buildTarget": "angular-example:build:production"
@@ -70,13 +70,13 @@
7070
"defaultConfiguration": "development"
7171
},
7272
"extract-i18n": {
73-
"builder": "@angular-devkit/build-angular:extract-i18n",
73+
"builder": "@angular/build:extract-i18n",
7474
"options": {
7575
"buildTarget": "angular-example:build"
7676
}
7777
},
7878
"test": {
79-
"builder": "@angular-devkit/build-angular:karma",
79+
"builder": "@angular/build:karma",
8080
"options": {
8181
"polyfills": ["zone.js", "zone.js/testing"],
8282
"tsConfig": "tsconfig.spec.json",

templates/angular-example/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
},
1616
"private": true,
1717
"dependencies": {
18-
"@angular/animations": "^20.2.4",
19-
"@angular/common": "^20.2.4",
20-
"@angular/compiler": "^20.2.4",
21-
"@angular/core": "^20.2.4",
22-
"@angular/forms": "^20.2.4",
23-
"@angular/platform-browser": "^20.2.4",
24-
"@angular/platform-browser-dynamic": "^20.2.4",
25-
"@angular/router": "^20.2.4",
18+
"@angular/animations": "^21.0.0",
19+
"@angular/common": "^21.0.0",
20+
"@angular/compiler": "^21.0.0",
21+
"@angular/core": "^21.0.0",
22+
"@angular/forms": "^21.0.0",
23+
"@angular/platform-browser": "^21.0.0",
24+
"@angular/platform-browser-dynamic": "^21.0.0",
25+
"@angular/router": "^21.0.0",
2626
"@junobuild/core": "^3.1.0",
2727
"@junobuild/functions": "^0.4.0",
2828
"nanoid": "^5.1.5",
@@ -31,9 +31,9 @@
3131
"zone.js": "^0.15.1"
3232
},
3333
"devDependencies": {
34-
"@angular-devkit/build-angular": "^20.2.2",
35-
"@angular/cli": "^20.2.2",
36-
"@angular/compiler-cli": "^20.2.4",
34+
"@angular/build": "^21.0.0",
35+
"@angular/cli": "^21.0.0",
36+
"@angular/compiler-cli": "^21.0.0",
3737
"@tailwindcss/postcss": "^4.1.13",
3838
"@types/jasmine": "~5.1.9",
3939
"angular-eslint": "20.2.0",
@@ -44,7 +44,7 @@
4444
"karma-coverage": "~2.2.1",
4545
"karma-jasmine": "~5.1.0",
4646
"karma-jasmine-html-reporter": "~2.1.0",
47-
"postcss": "^8.5.6",
47+
"postcss": "^8.5.3",
4848
"prettier": "^3.6.2",
4949
"prettier-plugin-tailwindcss": "^0.6.14",
5050
"tailwindcss": "^4.1.13",
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { provideZoneChangeDetection } from '@angular/core';
12
import { bootstrapApplication } from '@angular/platform-browser';
23
import { AppComponent } from './app/app.component';
34
import { appConfig } from './app/app.config';
@@ -8,6 +9,7 @@ import { appConfig } from './app/app.config';
89
// eslint-disable-next-line
910
(window as any).global = window;
1011

11-
bootstrapApplication(AppComponent, appConfig).catch((err) =>
12-
console.error(err),
13-
);
12+
bootstrapApplication(AppComponent, {
13+
...appConfig,
14+
providers: [provideZoneChangeDetection(), ...appConfig.providers],
15+
}).catch((err) => console.error(err));

templates/angular-example/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
"sourceMap": true,
1414
"declaration": false,
1515
"experimentalDecorators": true,
16-
"moduleResolution": "node",
16+
"moduleResolution": "bundler",
1717
"importHelpers": true,
1818
"target": "ES2022",
1919
"module": "ES2022",
20-
"useDefineForClassFields": false,
21-
"lib": ["ES2022", "dom"]
20+
"useDefineForClassFields": false
2221
},
2322
"angularCompilerOptions": {
2423
"enableI18nLegacyMessageIdFormat": false,

0 commit comments

Comments
 (0)