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
Webpack 5 support? #63
Comments
I haven't tried it. Could you give it a test run @midnightcoder-pro and let me know what happens? |
|
Thanks for testing @smadrom! Looks like some work will be needed here: webpack-livereload-plugin/index.js Lines 163 to 165 in 6859045
Not sure where |
It can be imported from webpack. I could fix this if you'd like. @statianzo, do you think a new major would be needed? |
If it’s a matter of just conditionally using that property off the webpack package, then a minor would be fine. If the shape of the compilation given to the hook differs and requires implementation changes, then a major bump makes sense. |
It's a bit harder than I thought. The documentation of |
@pataar not really documentation but this might help: https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/9d30b6a8e7f800fe4516865987977fc30d8114fb/lib/index.js#L231. I think they are essentially trying to do the same thing and it works for WP 5. EDIT: normalModuleFactory.hooks.afterResolve.tap(
this.constructor.name,
// Add react-refresh loader to process files that matches specified criteria
(resolveData) => {
injectRefreshLoader(resolveData.createData, matchObject);
}
); Ignore me if I'm totally off-topic. This is the first time I'm trying to read a WP plugin code. |
Since most of the code that broke isn't 100% essential for basic usage, I've created a fork that is functional with webpack 5. The major differences are:
For anyone who needs just the basic function while a real fix is made, you can find the fork here: |
I'm a little confused, is a fix for webpack-livereload-plugin for webpack-5 still being worked on? It is the last blocking dep my project has, we use the append script option. |
@nypinstripes check this fork, it's works with append script option : |
@TiTnOuK , I'm having the exact same error with your package installed. |
@statianzo @web-mi Hey, just checking this is on the radar, kind of in a holding pattern but don't want to let the webpack framework upgrades get too far away from us. |
ping |
Hey, |
thank you much @web-mi |
No description provided.
The text was updated successfully, but these errors were encountered: