Skip to content

[pull] master from angular:master - #34

Merged
pull[bot] merged 12 commits into
dizzydaizy:masterfrom
angular:master
Apr 8, 2021
Merged

pull[bot] merged 12 commits into
dizzydaizy:masterfrom
angular:master

Conversation

@pull

@pull pull Bot commented Apr 8, 2021 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

alan-agius4 and others added 12 commits April 8, 2021 08:30
Update `@angular/dev-infra-private` package to the latest version.
The `@angular-devkit/build-webpack` package now officially supports Webpack 5.
Webpack 4 support is temporarily maintained while the remainder of the tooling is transitioned.
…the build system

With this change Webpack 5 is now used by the Angular tooling to build applications. Webpack 4 usage and support has been removed.
No project level configuration changes are required to take advantage of the upgraded Webpack version when using the official Angular builders.
Custom builders based on this package that use the experimental programmatic APIs may need to be updated to become compatible with Webpack 5.

BREAKING CHANGE: Webpack 5 lazy loaded file name changes
Webpack 5 generates similar but differently named files for lazy loaded JavaScript files in development configurations (when the `namedChunks` option is enabled).
For the majority of users this change should have no effect on the application and/or build process. Production builds should also not be affected as the `namedChunks` option is disabled by default in production configurations.
However, if a project's post-build process makes assumptions as to the file names then adjustments may need to be made to account for the new naming paradigm.
Such post-build processes could include custom file transformations after the build, integration into service-side frameworks, or deployment procedures.
Example development file name change: `lazy-lazy-module.js` --> `src_app_lazy_lazy_module_ts.js`

BREAKING CHANGE: Webpack 5 web worker support
Webpack 5 now includes web worker support. However, the structure of the URL within the `Worker` constructor must be in a specific format that differs from the current requirement.
Web worker usage should be updated as shown below (where `./app.worker` should be replaced with the actual worker name):
Before: `new Worker('./app.worker', ...)`
After:  `new Worker(new URL('./app.worker', import.meta.url), ...)`
…ndle stats for Webpack 5

Newer Webpack 5 APIs allow the bundle stat generation for analytics to be optimized including less iteration of chunks and assets.
The direct Webpack test for the Webpack plugin is now updated to use Webpack 5 as Webpack 5 is now the default for the Angular tooling.
…tion

This change allows multiple instances of the `AngularWebpackPlugin` to be present in a Webpack configuration.
Each plugin instance should reference a different TypeScript configuration file (`tsconfig.json`) and the TypeScript configuration files should be setup to not include source files present in the other TypeScript configuration files. If files are included in more than one TypeScript configuration, the first plugin present in the Webpack configuration that can emit the file will be used.

Closes: #5072
Webpack 5 now includes web worker support. However, the structure of the URL within the `Worker` constructor must be in a specific format.
Before: `new Worker('./app.worker', ...)`
After: `new Worker(new URL('./app.worker', import.meta.url), ...)`
@pull pull Bot added the ⤵️ pull label Apr 8, 2021
@pull
pull Bot merged commit dc2f678 into dizzydaizy:master Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants