Comments (6)
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.
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.
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.
from webpacker.
@nathanstitt webpack-dev-server support is now merged with #55 :)
from webpacker.
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)
- Webpacker compilation takes more than 1.5 hours HOT 11
- How do I allow a package in node_modules to be processed by babel? HOT 1
- Remove addition of node_modules to Rails.application.config.assets.paths HOT 1
- V6 Status HOT 3
- Raise an error when javascript_pack_tag or stylesheet_pack_tag are called more than once HOT 1
- Regular Expression Denial of Service in postcss HOT 2
- Intermittent Webpacker.dev_server.running? behavior HOT 2
- Host for assets from a webpacker configuration using custom domains not being resolved HOT 2
- Cherry-pick "Nothing to do" logging update onto `5.x` HOT 1
- Rails 6 WebPacker is not calling JQuery inside views HOT 1
- Security Vulnerability in [email protected] HOT 2
- currently no loaders are configured to process this file HOT 1
- Incompatibility with Ruby 3.2.0 HOT 2
- Confusing gem description on RubyGems HOT 1
- Npm package for 5.4.4 was not released HOT 2
- class variable @@local_levels of ActiveSupport::Logger is overtaken by Logger HOT 2
- Trying to deploy but assets assets:precompile fail
- Security Vulnerability for postcss
- Postcss Security Vulnerability
- My background image on SASS isnt appearing when I publish the repocitory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpacker.