|
40 | 40 |
|
41 | 41 | A detailed changelog is available in the [releases](https://github.com/angular-schule/angular-cli-ghpages/releases) section. |
42 | 42 |
|
43 | | -**⚠️ BREAKING CHANGE (v2)** |
| 43 | +**⚠️ BREAKING CHANGE (v3)** |
44 | 44 |
|
45 | | -The internal build of Angular has changed with Angular 17. |
46 | | -Unfortunately, there are now a lot of different _build targets_ and builders. |
47 | | -We will try to guess the correct build target, based on the usual conventions to name them. |
48 | | -The conventions are shown below, try to specify the build target more and more explicitly until the project compiles. |
49 | | - |
50 | | -In the following example, your app is called `test` and you want to deploy the `production` build. |
51 | | - |
52 | | -```bash |
53 | | -ng deploy |
54 | | -``` |
55 | | - |
56 | | -If this doesn't work, try this: |
57 | | - |
58 | | -```bash |
59 | | -ng deploy --build-target=test |
60 | | -``` |
61 | | - |
62 | | -If this doesn't work, try this: |
63 | | - |
64 | | -```bash |
65 | | -ng deploy --build-target=test:build:production |
66 | | -``` |
67 | | - |
68 | | -You can also and modify your `angular.json` to archive the same: |
69 | | - |
70 | | -```json |
71 | | -{ |
72 | | - "deploy": { |
73 | | - "builder": "angular-cli-ghpages:deploy", |
74 | | - "options": { |
75 | | - "buildTarget": "test:build:production" |
76 | | - } |
77 | | - } |
78 | | -} |
79 | | -``` |
80 | | - |
81 | | -You can also use `prerenderTarget` instead of `buildTarget` for prerendered/SSG applications. |
82 | | - |
83 | | -**Target Resolution Precedence:** |
84 | | - |
85 | | -Build target options are resolved in this priority order: |
86 | | -1. `prerenderTarget` (if specified) — highest priority |
87 | | -2. `buildTarget` |
88 | | -3. Default: `${project}:build:production` if none specified |
89 | | - |
90 | | -There is no support for `universalBuildTarget` or `serverTarget` because GitHub Pages only supports static assets and no Server-Side Rendering! |
91 | | - |
92 | | -We will then try to deploy the `dist/test/browser` folder to GitHub Pages. |
93 | | -If this is not the folder that you want to serve, you should explicitly specify the directory with the `--dir` option: |
94 | | - |
95 | | -```bash |
96 | | -ng deploy --dir=dist/test/browser |
97 | | -``` |
98 | | - |
99 | | -This new build logic is a breaking change, therefore `angular-cli-ghpages` v2+ requires Angular 18 or higher. |
100 | | -For previous versions of Angular, use `angular-cli-ghpages` v1.x. |
| 45 | +`angular-cli-ghpages` v3 supports Angular 18 to 21. |
| 46 | +For previous versions of Angular, use v1 or v2. |
101 | 47 |
|
102 | 48 | ## ⚠️ Prerequisites <a name="prerequisites"></a> |
103 | 49 |
|
|
0 commit comments