The experimental esbuild-based browser application builder will now consider SVG files as
Angular component templates. Previously, only HTML files were considered templates and this
resulted in the esbuild-based builder to try to process the SVG file as a stylesheet.
This contains several minor adjustments to the setup steps for the experimental
esbuild-based browser application builder. It better groups the output directory
deletion and creation steps as well as moves entry point normalization into the
normalize options helper function. This should reduce the size of the main
execution function as well as aid in future profiling of the build phases.
The sourcemap URL in the output CSS files for global stylesheets is now correctly updated to
reflect the name of the global stylesheet output file and not the internal `stdin` virtual
file name.
Previously, the Sass compiler was imported on the start of every build regardless of its usage.
The Sass compiler will now only be loaded if a Sass stylesheet is requested.
When using the experimental esbuild-based browser application builder with Sass stylesheets, an
additional string creation for each output stylesheet will now be avoided when sourcemaps are disabled.
The global stylesheet processing using esbuild and the code bundling that also uses esbuild are now executed
asynchronously. Previously, the global stylesheet processing was required to wait until the code bundling was
complete before starting. Any warnings and/or errors for global stylesheets will also now be shown even if there
are errors during code bundling.
The global stylesheet bundling and processing code has been moved out of the main builder execution function
and into a separate function. This shortens the length of the main execution function for the builder and also
allows for further refactoring to allow the code and global stylesheet bundling to be executed at the same time.
PR #23691 introduced a regression that caused paranthesis in url not to be handled correctly.
This change correct this behaviour and adds a test case to valid this.
Closes#23773
Updates to the TypeScript 4.8 RC and adds some code to account for a breaking change where the decorators and modifiers of an AST node have been combined into a single array.
CSS does not support the single line JS comment (`//`) but rather only the multi-line comment (`/* */`).
When generating the sourcemap URL comment with the modern Sass API, the multi-line comment syntax will
now be used. This removes the esbuild warnings per Sass file that would have otherwise been generated
when stylesheet sourcemaps are enabled for the build.
Stylesheet url tokens (`url(....)`) will now be processed when using the esbuild-based experimental browser
application builder. The paths will be resolved via the bundler's resolution system and then loaded
via the bundler's `file` loader. The functionality is implemented using an esbuild plugin to allow for all
file types to be supported without the need to manually specify each current and future file extension within
the build configuration.
The `externalDependencies` option also applies to the referenced resources. This allows for resource paths
specified with the option to remain unprocessed within the application output. This is useful if the relative
path for the resource does not exist on disk but will be available when the application is deployed.
With this change we replace Sass legacy with the modern API in the experimental esbuilder. The goal is that in the next major version this change is propagated to the Webpack builder.
Based on the benchmarks that we did Sass modern API is faster compared to the legacy version.
When using the experimental esbuild-based browser application builder, babel transformation
is now only performed on a file if the file requires the specific transformations enabled
for the build. This has the benefit of removing the need to parse and process files that
will not be affected by the enabled transformations.
From initial testing, this provides a 30% build time improvement for development builds of a
newly generated application and a 10% improvement for production builds.
esbuild now allows specifying whether individual JavaScript features should be supported in addition
to specifying the target JavaScript version for the output. This capability is now used to provide
the native async/await downleveling that is required by Zone.js when using the experimental esbuild-
based browser application builder. Since esbuild does not yet support downleveling async iteration
or async generators, Babel is still used when either of these syntax features are detected.
Previously, the RegExp didn't correctly handle cases where data URIs had escaped quotes like the below
```css
url("data:image/svg+xml;charset=utf-8,<svg width=/"16/" height=/"15/"></svg>")
```
Closes#23680
This dependency is only used to valid that node packages are resolved correctly.
With this change we mock the structure of font-awesome to avoid having to install it.
With this commit, we add a middleware that handles preflight requests as currently responses for this type of requests returning 404.
This is a temporary workaround until this issue is fixed upstream. See: https://github.com/webpack/webpack-dev-server/issues/4180Closes#23639
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.
The esbuild-based experimental builder will now leverage the bundler to perform resolution of CSS imports.
This allows for more comprehensive resolution including packages which use the `sass` and/or `style` custom
conditions within a `package.json` exports field.