react-rails icon indicating copy to clipboard operation
react-rails copied to clipboard

Feature request: Automate CSP integration, Related to HMR, react-hot-loader and webpack-dev-server

Open BookOfGreg opened this issue 5 years ago • 0 comments

Steps to reproduce

Use Webpacker, HMR, React-Hot-Loader in Rails > 5.2

Expected behavior

Rails CSP DSL could be automatically patched to allow for these things.

Actual behavior

CSP complains about ( http:// | wss:// )localhost:3035 and unsafe-eval

See Webpacker discussion for clues on how to auto-fix safely without impacting old-rails and sprockets users. https://github.com/rails/webpacker/issues/1057

System configuration

Webpacker version: Any React-Rails version: Any Rect_UJS version: Any Rails version: >=5.2 Ruby version: Any


For anyoen joining the discussion. How far should we try go with automating integrations with webpack-dev-server, HRM and react-hot-loader? We could start automatically making all modules hot in dev for instance... or for safety's sake just provide the relevant docs for people do DIY.

BookOfGreg avatar Jun 30 '19 13:06 BookOfGreg