-
Notifications
You must be signed in to change notification settings - Fork 104
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
fix: the source is not available on afterEmit #392
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nice work 👍🏼 |
This looks like it'll work, when I get a chance to test it out I'll get a new version published. Thank you!! |
I tested on my end and it fixes the issue! 🙌 |
Out in |
weaverryan
added a commit
to weaverryan/webpack-encore
that referenced
this pull request
Apr 28, 2021
ztoben/assets-webpack-plugin#392 makes our integrity calculation no longer work, as the files have not been emitted by the time processOutput() is called. A better fix will need to be created.
weaverryan
added a commit
to symfony/webpack-encore
that referenced
this pull request
May 3, 2021
…ryan) This PR was merged into the main branch. Discussion ---------- Locking assets-webpack-plugin to less than 7.1.0 ztoben/assets-webpack-plugin#392 makes our integrity calculation no longer work, as the files have not been emitted by the time processOutput() is called. A better fix will need to be created. I'll create an issue after merging this for that. The most obvious would be to - if possible - use the existing https://github.com/ztoben/assets-webpack-plugin#integrity If it IS possible (I don't know if it exposes all the same info we do), then we would need to deprecate the current format of the entrypoints.json file in favor of this new one. Commits ------- fa2c40b Locking assets-webpack-plugin to less than 7.1.0
This was referenced May 14, 2021
Den-dp
added a commit
to Den-dp/assets-webpack-plugin
that referenced
this pull request
May 17, 2021
To allow further refactoring/fixing of ztoben#327 since current solution breaks ztoben#404 and symfony/webpack-encore#969 Resolves: ztoben#392 ztoben#327
Den-dp
added a commit
to Den-dp/assets-webpack-plugin
that referenced
this pull request
Jun 23, 2021
To allow further refactoring/fixing of ztoben#327 since current solution breaks ztoben#404 and symfony/webpack-encore#969 Resolves: ztoben#392 ztoben#327
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
Plugin show an error with Webpack 5.
Error: Content and Map of this Source is not available (only size() is supported)
Why?
Webpack 5 release, replaces the source of assets with SizeOnlySource.
Official announce => https://webpack.js.org/blog/2020-10-10-webpack-5-release/#sizeonlysource-after-emit
Key idea:
Only "emit" called before "AfterEmit" has a source for assets. Use the "emit" hook only if there is hook support. So the old version of the Webpack will continue to use the "afterEmit" hook with the old plugin apply.
Closes #327