`remapping` returns a SourceMap object and not a plain object. This causes
Babel to fail with `don't know how to turn this value into a node` when
invoked from `istanbul-lib-instrument` as Babel checks if the value is a
plain object.
See: 780aa48d2a/packages/babel-types/src/converters/valueToNode.ts (L115-L130)
This was previously fixed in commit da1733cc69eeac1417e47df23389da1658850ada
but the fix was lost as part of commit 0c44ab305836abab26dc81d7c962f330898213fd.
When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files.
Closes: #21394
The `proxyConfig` option for the `dev-server` builder now supports JSON files containing comments and trailing commas.
Several additional tests regarding the use of ESM and CommonJS JavaScript configuration files were also added to reduce the likelihood of future regressions.
Closes: #21862
We now pass the input sourcemap to istanbul babel plugin, since this is used directly by the instrumenter d58c92a7de/src/index.js (L126-L129) and is needed to remapped instrumented code back to the original source.
Previously, the lack of this caused incorrect reports of uncovered and coverage code and also incorrectly mappings in the HTML report.
Closes#22118
esbuild will issue a warning when `@charset` is in the middle of the file. This is caused by css-loader will concats the file and doesn't hoist `@charset`, (https://github.com/webpack-contrib/css-loader/issues/1212).
While, esbuild will issue a warning regarding the above, it will hoist to the very top.
In many cases, this warning is not actionable by the users as the `@charset` would be likely specified in 3rd party libs.
Closes#22097
```
Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
```
Closes#22084
There was previously the potential for two workers to complete quickly at the same time which could result in one of the results not being propagated to the remainder of the system. This situation has now been corrected by removing the worker execution at a later point in the process.
(cherry picked from commit 802b1b0378c1816dbfd8f4320b5d69e82f0c7aa6)
With this change we unify most of the webpack configuration into the common configuration. A number of lengthy functions and code portions have been moved into a seperate file to make the configuration easier to follow.
With this change we replace `@jsdevtools/coverage-istanbul-loader` webpack loader with [`babel-plugin-istanbul`](https://github.com/istanbuljs/babel-plugin-istanbul) which is an official Babel plugin by the istanbuljs team.
Previously, when code coverage was enabled we had multiple Babel runs on the same file. This is because istanbuljs' `instrumentSync` and `instrument` APIs which are used by the Webpack plugin invokes Babel directly 66bc39b3c7/packages/istanbul-lib-instrument/src/instrumenter.js (L98)
By using the babel plugin directly, we avoid this which also improves the sourcemaps correctness and test performance.
Closes#22010
This change brings in a security fix causes was causes by an outdated dependency. See https://github.com/GoogleChromeLabs/critters/pull/82 for more information.
Also, remote stylesheets are excluded from processing, were previously this caused build failures.
Closes#20794
Temporary JavaScript application files that have been queued for i18n processing are now removed immediately after reading their content. This reduces the on-disk size of temporary files as well as reduces the needed disk access during the final asset copy phase of the i18n inlining process. Additional debug logging has also been added to the i18n inlining process which can be enabled via the `NG_DEBUG=1` environment variable.
`remapping` will return a SourceMap which it's prototype is not a simple object. This causes Babel to fail when it invoked from `istanbul-lib-instrument` because Babel with `don't know how to turn this value into a node` error as Babel will not process not simple objects.
See: 780aa48d2a/packages/babel-types/src/converters/valueToNode.ts (L115-L130)Closes#21967
Currently, using 2 Angular applications from the same workspace on the same page causes a conflict because both of the webpack runtime chunks naming are the same.
With this change we configure the runtime chunk name to be inferred from the project name. This also results in reducing unnecessary file reads which Webpack needs to do to infer the name from the workspace package.json.
For more information about this option see: https://webpack.js.org/configuration/output/#outputuniquenameCloses#21957
Add missing "Failed to compile" message when the webpack build is not
successful. This is useful for [background problem matchers](https://code.visualstudio.com/docs/editor/tasks#_background-watching-tasks).
Previously, it was not possible to tell using a regular expression when
the compiler has stopped when there was an error, as no message was
printed.