Coder Social home page Coder Social logo

Comments (6)

renchap avatar renchap commented on August 17, 2024

I am also thinking about how to be able to use webpack-dev-server with Webpacker, specifically to enable hot releoading with my webpacker-react gem.
It would be great if we can use webpack-dev-server the same way ./bin/webpack-watcher is currently used, and this would not need much : a config file and a change to javascript_pack_tag to load the assets from it.

I planned to do this from my gem, but it would be much better to have this support directly into Webpacker. If this is not desirable, an alternate solution would be to have a webpacker-dev-server gem that would add this support and that you can depend on.

from webpacker.

dhh avatar dhh commented on August 17, 2024

I'm open to exploring the use of the dev-server, but I'm not convinced it's worth the extra complexity out the box. I want to make sure that everything is working just as well and easy as with the simple watcher. I heard several stories about hot loading not working too well in all scenarios.

But feel free to propose a PR and let's look at it!

from webpacker.

renchap avatar renchap commented on August 17, 2024

I agree this needs to be optional and only enabled if the user has a need for it (or if he uses a webpacker plugin that requires it).

I am thinking about a new ./bin/webpack-dev-server stub as long as a config option for the user to put in config/environments/development.rb to set the dev server host / port (with a default). Probably worth displaying usage for this option when you launch the dev server through the stub if its not set (I dont know if there is a proper way for this?). This way it is all optional.

Would that be a good starting point for you?

from webpacker.

dhh avatar dhh commented on August 17, 2024

from webpacker.

renchap avatar renchap commented on August 17, 2024

@nathanstitt webpack-dev-server support is now merged with #55 :)

from webpacker.

nathanstitt avatar nathanstitt commented on August 17, 2024

Awesome news @renchap - going to play with this shortly.

I'd say we can close this now. Thanks to all for the replies

from webpacker.

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.