rails / jsbundling-rails

Bundle and transpile JavaScript in Rails with esbuild, rollup.js, bun, or Webpack.
MIT License
849 stars 147 forks source link

exec foreman to replace current process #131

Closed stevenharman closed 1 year ago

stevenharman commented 2 years ago

Use exec to invoke foreman to make sure bin/dev is replaced by the foreman process. This ensures that foreman gets bin/dev's pid (so it's cleaned up properly) and that interrupts and signals (like ctrl+c) are handled correctly by foreman (to shut down child processes).

stevenharman commented 2 years ago

I went over to cssbundling-rails to make the exec change there too, and realized @defeated already did it! 😂 And they used a more widely-available shell, so I've added that here too. Happy to squash these together if y'all prefer.