Closed Dabolus closed 6 years ago
2 x 👍 | I was playing around with webpack-serve just a couple of days ago. Much faster. Support goes back to IE11 and pretty much all recent browsers accept Opera, I believe. So the benefit far exceeds any downside as near as I can tell.
On Tue, Apr 10, 2018, 10:01 AM Giorgio Garasto notifications@github.com wrote:
webpack-serve https://github.com/webpack-contrib/webpack-serve offers the same functionalities as webpack-dev-server https://github.com/webpack/webpack-dev-server, but it is much faster, since it uses native WebSockets. The only flaw is that it can only be used on modern browsers that natively support web sockets, but since the project is already built to use the latest technologies, this shouldn't be a problem at all
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Dabolus/polymer3-webpack-starter-kit/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AYC27ecT2_q7H8OG9HLbrYg_20A5IXW8ks5tnMlkgaJpZM4TOcFj .
Hmm - Just a heads up. I just tried to configure webpack-serve on a new PSK build and ran into this:
ERROR in multi webpack-hot-client
I haven't had time to debug further, but it appears there is a conflict with koa-webpack issue #30 and also a reference from webpack-serve issue #8 where both are required deps. Perhaps you've already found a way around this, but I thought I would post it just in case.
Thank you for spotting this out! I managed to make everything work fine by making some tweaks to the configuration. Now everything seems to work pretty fine, except for the useHTTP2
option. webpack-dev-server
manages the certificates creation itself, while webpack-serve
doesn't allow you to do that automatically for now. It shouldn't be too complicated to work around this though. Like HTTP2, also the enableGzip
option and the history API fallback require some extra work with custom middlewares. For this reason, I decided to move the server configuration options to a different file that is included by webpack.dev.conf.js
. I know that files is the conf
directory are becoming a lot, but I think it is better to separate the concerns instead of putting everything in a single, enormous file (that is also the reason why I created this project with separation of concerns 😉)
Great. Very nice. And I consider the confusion files a plus, especially for users new the OSK and to Webpack.
On Wed, Apr 11, 2018, 1:18 AM Giorgio Garasto notifications@github.com wrote:
Thank you for spotting this out! I managed to make everything work fine by making some tweaks to the configuration. Now everything seems to work pretty fine, except for the useHTTP2 option. webpack-dev-server manages the certificates creation itself, while webpack-serve doesn't allow you to do that automatically for now. It shouldn't be too complicated to work around this though. Like HTTP2, also the enableGzip option and the history API fallback require some extra work with custom middlewares. For this reason, I decided to move the server configuration options to a different file that is included by webpack.dev.conf.js. I know that files is the conf directory are becoming a lot, but I think it is better to separate the concerns instead of putting everything in a single, enormous file (that is also the reason why I created this project with separation of concerns 😉)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Dabolus/polymer3-webpack-starter-kit/issues/57#issuecomment-380340077, or mute the thread https://github.com/notifications/unsubscribe-auth/AYC27YYQRSKIggWSFsAMo7TqmJVXWPr3ks5tnaBTgaJpZM4TOcFj .
According to https://github.com/webpack-contrib/webpack-serve/issues/16, webpack-serve
authors are working together with devcert
authors to provide an easy solution to this issue. For now, I'm going to leave HTTPS out of the configuration, as it would require a lot of extra work to handle certificate creation and handling. Of course, those who are interested in local testing using HTTPS will still be able to create and use their own certificates, but in this way other users won't have that extra layer of confusion
Makes total sense. For those us who have experience generating certs, the process of doing that and adding paths back into the config or command line is trivial. Thanks again for staying ahead of the performance band. We're actually using a fork of this for our new business PWA site. Will be excited to show that off as a "what you can do with the PSK in the coming week or two. Cheers!
On Fri, Apr 13, 2018, 2:18 PM Giorgio Garasto notifications@github.com wrote:
According to webpack-contrib/webpack-serve#16 https://github.com/webpack-contrib/webpack-serve/issues/16, webpack-serve authors are working together with devcert authors to provide an easy solution to this issue. For now, I'm going to leave HTTPS out of the configuration, as it would require a lot of extra work to handle certificate creation and handling. Of course, those who are interested in local testing using HTTPS will still be able to create and use their own certificates, but in this way other users won't have that extra layer of confusion
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Dabolus/polymer3-webpack-starter-kit/issues/57#issuecomment-381236550, or mute the thread https://github.com/notifications/unsubscribe-auth/AYC27VYZvRC_SuSqQCFVqVQzs-aOMr_-ks5toPofgaJpZM4TOcFj .
webpack-serve offers the same functionalities as webpack-dev-server, but it is much faster, since it uses native
WebSocket
s. The only flaw is that it can only be used on modern browsers that natively support web sockets, but since the project is already built to use the latest technologies, this shouldn't be a problem at all