Skip to content

fix(@ngtools/webpack): allow generated assets of Angular component resources #21296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

clydin
Copy link
Member

@clydin clydin commented Jul 6, 2021

The asset caching for Angular component resources previously required that all assets had an originating file. However, some Webpack plugins may generate assets that do not originate from on-disk files and are instead synthetic. These type of assets are now supported by generating a cache key based on the output name of the asset. These assets will persist within the cache due to the lack of knowledge on the dependencies of these assets which results in the inability to invalidate the assets. Updated assets of the same output name will, however, replace older versions of the asset on rebuilds.

Fixes: #21290

…sources

The asset caching for Angular component resources previously required that all assets had an originating file. However, some Webpack plugins may generate assets that do not originate from on-disk files and are instead synthetic. These type of assets are now supported by generating a cache key based on the output name of the asset. These assets will persist within the cache due to the lack of knowledge on the dependencies of these assets which results in the inability to invalidate the assets. Updated assets of the same output name will, however, replace older versions of the asset on rebuilds.

Fixes: angular#21290
@google-cla google-cla bot added the cla: yes label Jul 6, 2021
@clydin clydin added the target: patch This PR is targeted for the next patch release label Jul 6, 2021
@clydin clydin marked this pull request as ready for review July 7, 2021 22:55
@clydin clydin requested a review from alan-agius4 July 9, 2021 14:23
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 9, 2021
@filipesilva filipesilva merged commit 7536338 into angular:master Jul 9, 2021
@clydin clydin deleted the ngtools/generated-resource-assets branch July 9, 2021 16:02
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular 12 AngularWebpackPlugin is not compatible with some webpack plugins
3 participants