Skip to content

Conversation

@j0ashm
Copy link

@j0ashm j0ashm commented Jul 27, 2023

This PR adds support for processAssets - webpack's successor to optimizeChunkAssets.

Currently, if you use optimizeChunkAssets in your build, you will be met with a deprecation warning.

I'm not a Webpack expert by any means, so most of the code for this PR is based off of this comment in #11.

Something that someone who has better knowledge of Webpack should comment on:

  • Is it possible to get the asset/chunk hash from Source? I don't see a method to get it directly on the documentation, and I'd like to be able to just use the pre-existing writeFile function.
  • Should compatibility for optimizeChunkAssets be retained? I have it retained for now, but I'm not sure if it's desirable

j0ashm added 2 commits July 25, 2023 16:58
optimizeChunkAssets has a deprecation notice for it, add support
for processAssets to avoid viewing warnings everytime.

This commit keeps compatibility for using optimizeChunkAssets if
the end-user is using a version of webpack which doesn't have
processAssets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant