In this commit, the custom implementation of a promise-based setTimeout function has been replaced with the native Node.js setTimeout function, which now returns a promise.
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
This commit introduces an `--inspect` option to the dev-server, enabling debugging of server-side code when using SSR or SSG. This option is equivalent to `node --inspect=[[host:]port]`.
Usage examples:
```
$ ng serve --inspect
$ ng serve --inspect 9999
$ ng serve --inspect localhost:9999
```
Closes: #27773
Newly generated projects will now use ECMAScript standard class field behavior by default.
If the legacy TypeScript behavior is required for a new project the `useDefineForClassFields`
TypeScript option can be set to `false` within the application's `tsconfig`. This should
be uncommon, and if needed, it is recommended to adjust code to match standard behavior where
possible.
There might be cases were currently, the render application promise does not resolve because the application never becomes stable in most cases this is due to errors, this causes the worker to never exit and the build to keep running until it's manually terminated.
With this change, we add a maximum rendering timeout of 30seconds for each page.
Closes#27565
When creating a local development build of the repository via `yarn build --local`,
the package version for `@angular/build` within `@angular-devkit/build-angular`
will now correctly be replaced with the path to the locally built archive of
`@angular/build`.
The `extract-i18n` option schema has been updated to reflect that the
`buildTarget` option is not required. The option value will default
to the `build` target of the containing project. This removes the need
for an additional option and character count within the `angular.json`
file for the project. This change also applies to the deprecated
`browserTarget` option.
This change ensures that `ngDevMode` is replaced in node packages, aligning the behavior of the Vite server more closely with a production environment.
With the `application` builder already within the new `@angular/build` package,
the Vite-based `dev-server` builder is now also contained within this package.
Only the Vite-based aspects of the `dev-server` have been moved and only the
support for the `application` builder. The compatibility builder `browser-esbuild`
is not supported with `@angular/build:dev-server`. The existing `dev-server` builder
found within `@angular-devkit/build-angular` should continue to be used for both the
Webpack-based `browser` builder and the esbuild-based compatibility `browser-esbuild`
builder. To maintain backwards compatibility, the existing `@angular-devkit/build-angular:dev-server`
builder continues to support builders it has previously.
No change to existing applications is required.
To reduce the complexity of the move of the Vite-based dev-server builder
into the `@angular/build` package. The soon to be self-referencing imports
are now located in a separate file. Self-referencing imports are not well
supported inside the repository currently so this move allows the imports
to be adjusted in one location.
The index output option helper from within the Webpack-based build system has been removed
from the Vite-based development server code to support separation of the builder. This
information will eventually be passed via the build system results and the direct option
access can then be removed completely.
The dev-server builder will now only provide an interface with typed fields
for the combined set of common elements for the Webpack and Vite development
server implementations. Any additional builder specific runtime fields will
still be present and accessible.
The `@angular/build` package has been introduced to house the esbuild/Vite-based
build system that was newly introduced as stable in v17. The existing
`@angular-devkit/build-angular` package will continue to contain the Webpack-based
build system and to ensure backwards compatibility it will also provide aliases
for the esbuild/Vite-based build system. The changes here are the first stage
of the builder transition and moves the `application` builder into the new package.
The application builder can now be accessed when this package is installed directly
via `@angular/build:application`.
No changes are required for existing projects.
The application builder previously used several TypeScript compiler host augmentation helper functions
and the bootstrap replacement transformer from the `@ngtools/webpack` package. To remove reliance on
Webpack-specific functionality. The subset of helpers have been copied into the application builder
itself. Some of the helpers will eventually be removed completely pending future updates to the
Angular compiler itself.