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

its not working anymore with webpack 4 #7

Open
BramscoChill opened this issue Jun 14, 2018 · 1 comment
Open

its not working anymore with webpack 4 #7

BramscoChill opened this issue Jun 14, 2018 · 1 comment

Comments

@BramscoChill
Copy link

The plugin isn't working anymore with webpack 4. I created an fix, bud I cannot make an pull request.

fix for webpack 4
index.js.txt

apply(compiler) { var compilationPlugin = (compilation, doCallback) => { return compilation.plugin( 'html-webpack-plugin-before-html-processing', (htmlPluginData, callbackHTMLData) => { if(doCallback){ return callbackHTMLData(null, this.Change(htmlPluginData)); } else { return this.Change(htmlPluginData); } } ); }; if (compiler.hooks) { compiler.hooks.compilation.tap("ChangeExtensionPlugin", (compilation) => compilationPlugin(compilation, false)); } else { return compiler.plugin( 'compilation', (compilation) => compilationPlugin(compilation, true) ); } }

@aaqibshehzad
Copy link

This is brilliant. Its working after i added this snippet. Thanks a lot!

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

No branches or pull requests

2 participants