Skip to content

Commit 81b2ce0

Browse files
committed
feat: support Angular 18
1 parent 13f28ba commit 81b2ce0

18 files changed

+13524
-7
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"pretest:fixtures:application-builder": "cd tests/fixtures/application-builder && npm ci",
2626
"pretest:fixtures:browser-builder": "cd tests/fixtures/browser-builder && npm ci",
2727
"pretest:fixtures:prerender-false": "cd tests/fixtures/prerender-false && npm ci",
28+
"pretest:fixtures:angular-18": "cd tests/fixtures/angular-18 && npm ci",
2829
"pretest": "run-s pretest:*",
2930
"test": "node --test"
3031
},

src/helpers/validateAngularVersion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const validateAngularVersion = async function (root) {
1818
}
1919

2020
const { version } = await readJSON(packagePath)
21-
if (!satisfies(version, '^17.0.0-rc', { includePrerelease: true })) {
22-
console.warn(`This site does not seem to be using Angular 17.`)
21+
if (!satisfies(version, '>=17.0.0-rc', { includePrerelease: true })) {
22+
console.warn(`This site does not seem to be using Angular 17 or later. Found: ${version}.`)
2323
return false
2424
}
2525

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angular-demo": {
7+
"projectType": "application",
8+
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:application",
15+
"options": {
16+
"outputPath": "dist/angular-demo",
17+
"index": "src/index.html",
18+
"browser": "src/main.ts",
19+
"polyfills": [
20+
"zone.js"
21+
],
22+
"tsConfig": "tsconfig.app.json",
23+
"assets": [
24+
{
25+
"glob": "**/*",
26+
"input": "public"
27+
}
28+
],
29+
"styles": [
30+
"src/styles.css"
31+
],
32+
"scripts": [],
33+
"server": "src/main.server.ts",
34+
"prerender": true,
35+
"ssr": {
36+
"entry": "server.ts"
37+
}
38+
},
39+
"configurations": {
40+
"production": {
41+
"budgets": [
42+
{
43+
"type": "initial",
44+
"maximumWarning": "500kB",
45+
"maximumError": "1MB"
46+
},
47+
{
48+
"type": "anyComponentStyle",
49+
"maximumWarning": "2kB",
50+
"maximumError": "4kB"
51+
}
52+
],
53+
"outputHashing": "all"
54+
},
55+
"development": {
56+
"optimization": false,
57+
"extractLicenses": false,
58+
"sourceMap": true
59+
}
60+
},
61+
"defaultConfiguration": "production"
62+
},
63+
"serve": {
64+
"builder": "@angular-devkit/build-angular:dev-server",
65+
"configurations": {
66+
"production": {
67+
"buildTarget": "angular-demo:build:production"
68+
},
69+
"development": {
70+
"buildTarget": "angular-demo:build:development"
71+
}
72+
},
73+
"defaultConfiguration": "development"
74+
},
75+
"extract-i18n": {
76+
"builder": "@angular-devkit/build-angular:extract-i18n"
77+
},
78+
"test": {
79+
"builder": "@angular-devkit/build-angular:karma",
80+
"options": {
81+
"polyfills": [
82+
"zone.js",
83+
"zone.js/testing"
84+
],
85+
"tsConfig": "tsconfig.spec.json",
86+
"assets": [
87+
{
88+
"glob": "**/*",
89+
"input": "public"
90+
}
91+
],
92+
"styles": [
93+
"src/styles.css"
94+
],
95+
"scripts": []
96+
}
97+
}
98+
}
99+
}
100+
}
101+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
command="npm run build"
3+
ignore="exit 1" ## always build, there might be changes in the plugin
4+
5+
[[plugins]]
6+
package="@netlify/angular-runtime"

0 commit comments

Comments
 (0)