The `use-application-builder` update migration will now attempt to migrate
the `ng-packagr` builder to use the `@angular/build` package if no other
`@angular-devkit/build-angular` usage is present.
The newly introduced `ng-packagr` builder within the `@angular/build` package
is now used when generating a new library with `ng generate library`. This
builder provides the same functionality as the `ng-packagr` builder found
within the `@angular-devkit/build-angular` package but removes the need for
projects to install `@angular-devkit/build-angular` if using the `application`
builder from `@angular/build`.
To support migration to the `@angular/build` package which contains the
`application` builder that is used by all new projects, the `ng-packagr`
builder used to build Angular libraries is also now available within this
package. This removes the need for projects that are using the application
builder but also would like to build a library from having to install the
Webpack related `@angular-devkit/build-angular` package. This can result
in a significant reduction in overall Node.js packages installed within the
project.
This update ensures that the `define` option is correctly passed to Vite during the prebundling phase of the application builder, improving compatibility and optimization of the build process.
Closes#29278
This change addresses recent updates in Vite that trigger pre-transform errors when SSR files (`/server.mjs`, `/main.server.mjs`) are missing. Skipping the configuration prevents unnecessary errors during the build process.
The `application` builder may now return more than one build result per
rebuild action. This will typically occur when using the development server
with HMR enabled. In this scenario, component template update results may
be sent to the development server in addition to incremental updates for
global styles. TailwindCSS, for instance, may update the global stylesheet
for an application based on the usage of styles within a given template.
Ensure files with names resembling bundles, such as `main.js`, can be served correctly. This resolves issues where specific filenames were mistakenly treated as generated bundles, preventing them from being accessed directly.
Closes#29232
The integration tests for the application and dev-server targets within
`@angular/build` have been separated into two bazel targets. This allows
more fine-grained control of test options for each builder as well as reducing
the overall size of each target.
The `@angular-devkit/schematics` package has been migrated to the `rules_js` ts_project rule.
The tsconfig path mappings for the `@angular-devkit` scope have also been cleaned up now that
all the packages within this scope have been migrated.
The dev-server will now leverage the incremental build result data from the application
builder. This removes the need to directly analyze all the newly built files within the
dev-server to determine what type of update is needed. Incremental build results also
only contain the files that are new and/or modified and removes the need to pass a potentially
large amount of file content between the application build and the dev-server.
When the application build is in watch mode, incremental build results will
now be generated. This allows fine-grained updates of the files in the output
directory and supports removal of stale application code files.
Note that stale assets will not currently be removed from the output directory.
More complex asset change analysis will be evaluated for inclusion in the future
to address this asset output behavior.
Two tests related to the protractor builder have been removed (e2e-host & http-headers).
Two tests with existing integration tests have been removed (http-headers & proxy-config).