Code Monkey home page Code Monkey logo

Comments (3)

shellscape avatar shellscape commented on June 1, 2024 11

I suppose we could be a section in there to explicitly address that. Well the important bits are at the top:

webpack-hot-client accomplishes this by creating a WebSocket server, providing the necessary client (browser) scripts that communicate via WebSockets, and automagically adding the necessary webpack plugins and config entries. All of that allows for a seamless integration of Hot Module Support.

And https://github.com/webpack-contrib/webpack-hot-client#browser-support.

webpack-hot-middleware supports ancient browsers via a client/serve communication technique that has support going back to early IE, whereas this module uses WebSockets. Our technique is faster and more flexible, but the browser support requires newer versions. Folks that have to support old browsers or browsers that haven't implemented WebSockets won't be able to use this hot-client. The other big different is that hot-middleware is middleware and it requires a server that uses express-style middleware patterns. On the flip side, hot-client is not middleware and can be run in tandem with any server kind. Thought that's kind of moot if using webpack-dev-middleware, which is the most likely scenario.

The final difference comes from this line:

Reminder: You don't have to modify your config at all!

hot-middleware requires users to modify their config to use it. Webpack as an org is trying to move away from making users do extra lifting, and hot-client follows that mantra by automatically inserting plugins and entry scripts into a compilation for the user. It's a more seamless experience.

from webpack-hot-client.

dlmr avatar dlmr commented on June 1, 2024 1

Great answer, thanks!

While it might be smart to make some of these things clearer in the documentation I now think it's good enough to have this issue here as a form of documentation that can be referenced and found if someone has the same questions as I. πŸ™‚

Given that I will go ahead and close this issue, please reopen if you want to use it for tracking an intended change. πŸ‘

from webpack-hot-client.

shellscape avatar shellscape commented on June 1, 2024

Thanks for raising a solid question. I'll update the README to point to this issue for that particular question.

from webpack-hot-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.