New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Puma-dev support Rails' webpack integration? #123

Closed
jeromedalbert opened this Issue Jul 22, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@jeromedalbert
Copy link

jeromedalbert commented Jul 22, 2017

Puma-dev supports Rails 5.0's new ActionCable feature. Does it support Rails 5.1's new Webpack integration through Webpacker?

Any rack app works, but webpack is a Node process, so I guess it's not supported. I am wondering if there is a workaround to support webpacker. Or maybe support Procfile apps that do not necessarily have rack-only processes (out of this project's scope?).

@tylerhunt

This comment has been minimized.

Copy link

tylerhunt commented Jul 31, 2017

I've been using Webpacker with Puma-dev by running webpack in watch mode (./bin/webpack --watch --progress). This will continually update the webpacker assets in public/packs, so they can then be served by Rails through the existing Puma-dev process.

If you want to run webpack-dev-server instead, presumably you could start that process and map the port to a Puma-dev hostname (e.g. assets.myapp.dev). You'll run into issues here if you're working on multiple apps simultaneously, as you'll have to mange the port number each uses, shuffle around which host is mapped to the default port, or use a generic mapping across all the apps and spin up and down the asset server as needed.

@jeromedalbert Did you have an integration in mind beyond these two options?

@jeromedalbert

This comment has been minimized.

Copy link

jeromedalbert commented Aug 8, 2017

@tylerhunt Thanks, I think the second option is what I am looking for, my idea being "launch all the servers automatically so that I don't have to fiddle with them". Although the manual port number management is not ideal.

I guess another alternative for automatic port management is using Foreman and Procfiles with $PORT, but then I lose the ease of having .dev domains and zero-config https support.

I guess there is no easy solution for my need then! #1stWorldProblems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment