Skip to content
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 interop with other plugins #8

Merged
merged 1 commit into from Mar 8, 2017
Merged

Fix interop with other plugins #8

merged 1 commit into from Mar 8, 2017

Conversation

pluma
Copy link
Contributor

@pluma pluma commented Mar 7, 2017

When using this plugin with other plugins attaching to the same hooks, the callback result will become the htmlPluginData object for the next plugin, so unmodified properties need to be copied or they will be lost.

I ran into this problem when using html-webpack-inline-source-plugin, which suffers from the same bug. Patching this in both plugins solved the issue.

See also the corresponding issue on the other repo. I'm not sure what these plugins are based on but I'm suspecting at some point someone blindly copied what the html-webpack-plugin unit tests are doing without consulting the actual implementation.

When using this plugin with other plugins attaching to the same hooks, the callback result will become the htmlPluginData object for the next plugin, so unmodified properties need to be copied or they will be lost.

I ran into this problem when using html-webpack-inline-source-plugin, which suffers from the same bug. Patching this in both plugins solved the issue.

See also [the corresponding issue on the other repo](DustinJackson/html-webpack-inline-source-plugin#18). I'm not sure what these plugins are based on but I'm suspecting at some point someone blindly copied what the html-webpack-plugin unit tests are doing without consulting the actual implementation.
@pluma
Copy link
Contributor Author

pluma commented Mar 7, 2017

This PR includes the fix from #7 but suffers from the same failing tests (though it does not modify the tests like #7 did so maybe there are other reasons for that).

@jamesjieye jamesjieye merged commit 0fcb333 into jamesjieye:master Mar 8, 2017
@jamesjieye
Copy link
Owner

@pluma The Travis build failed with node 0.12. This is caused by the style-loader's 0.13.2 release, which upgraded the loader-utils to 1.0.2. And loader-utils 1.0.2 only supports node engines +4.

And because of that, the html-webpack-exclude-assets-plugin can only supports node v4+.

@pluma pluma deleted the patch-1 branch March 13, 2017 23:35
@pluma
Copy link
Contributor Author

pluma commented Mar 13, 2017

Sweet. Thanks a ton!

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.

None yet

2 participants