koa-webpack
koa-webpack copied to clipboard
Upgrade to webpackv5
This is a work-in-progress. I'm going to try some builds out for this.
This PR contains a:
- [ ] bugfix
- [X] new feature
- [ ] code refactor
- [ ] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
I'd love to start using webpack 5 now that it's been out a while.
Breaking Changes
Still working through this
Additional Info
-
logLevel
was removed- https://github.com/webpack/webpack-dev-middleware/issues/774#issuecomment-734231560
-
lazy
was removed- https://github.com/webpack/webpack-dev-middleware/issues/622#issuecomment-617249193
Webpack5 upgrade guide: https://webpack.js.org/migrate/5/
Thanks for the PR, but I'm not interested in supporting v5 at the moment.
Thanks for the PR, but I'm not interested in supporting v5 at the moment.
Ah I see. I read one of your comments that you'd gladly accept a PR upgrading to webpack5, which is why I started on some of this. Is there anything else I can do to help?
Yeah, feelings changed. It's just a constant PITA with the buggy releases and the poor webpack-contrib management.
Ah, no worries about feelings changing. Cheers!
I do think quite a lot of people are interested in this though.
@shellscape Are you interested in supporting Webpack 5 eventually?
@ynotdraw Personally I would be interested in using your fork if you get this to work and publish it. No pressure of course. :)
Integration with koa isn't something that's really needed anymore. If you take a look at the source in this package, you'll see that it's basically a fancy wrapper around webpack-dev-middleware, with some extra sauce for HMR. Using that as koa middleware is totally unnecessary these days. Take a look at https://github.com/shellscape/webpack-plugin-serve, which is a dev server using the successor components to everything that koa-webpack uses. It's less complicated, has fewer moving parts, and just as easy to turn on and off as koa middleware. I've used that plugin with every koa project I've worked on in the last two years, and haven't used koa-webpack myself since.
I suppose you’re right. :)
Perhaps it’s time to officially deprecate this project then.
No sense is deprecating as it still works with webpack v4 very well. But folks should look to better solutions moving forward.
@shellscape I think maybe it would be nice to put disclaimer in readme (last two of your comments elaborate it well)? :-) thank you for your work here!