Skip to content

chunks passed to alter-assets event #574

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
merged 1 commit into from
Jan 29, 2017
Merged

chunks passed to alter-assets event #574

merged 1 commit into from
Jan 29, 2017

Conversation

numical
Copy link
Contributor

@numical numical commented Jan 29, 2017

Minor bug fix to ensure chunks param passed to alter-assets event - will also allow implementation of style-ext-html-webpack-plugin to be simplified.

@jantimon
Copy link
Owner

Can you please go a little bit in detail what your code change actually does?

@numical
Copy link
Contributor Author

numical commented Jan 29, 2017

Sure - it's a bug fix.
Each event is passed selected parts of html-webpack-plugin state.
So the ...before-html... events gets passed the assets, the ...after-emit... event gets passed the html etc.
The ...alter-assets... event is meant to be passed the chunks - which is quite useful. However there is a bug - the chunks value which is passed is taken from the previous event's result. The previous event is not actually passed this value so undefined is always sent.
The fix is to simply send the value generated by the ...alter-chunks... event . This, usefully, is already is scope so that is needed is to remove the incorrect assignment.

@jantimon jantimon merged commit 2d5c42f into jantimon:master Jan 29, 2017
jantimon pushed a commit that referenced this pull request Jan 29, 2017
@jantimon
Copy link
Owner

Cool - thanks a lot. Also merged into 3.x

@numical numical deleted the alter-assets-fix branch January 29, 2017 14:26
@lock
Copy link

lock bot commented May 31, 2018

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants