Using webpack-dev-server with rails server

Viewed 16

I should start by saying, i'm much more of a front end dev than a rails dev. The situation I am presented with today, is trying to move away from webpacker/react on rails. Our implementation was not really setup properly, and our bundle is full of extraneous code. Due to all the abstractions & screwed up setup, I am trying to decouple the FE from everything else.

I have pulled out some of the react app into a standalone directory, wherein I have setup webpack. I have made a new rails route/view/controller that is pointing to a bundle that I am currently manually copying into app/assets/javascripts (I will automate this in a build later on).

I am wondering if there is a way for me to set this up so that I can use webpack dev server, and this rails view. Still have hot reloading and all that jazz, but from an erb file served by rails server. Haven't found a ton of useful information while searching around, and am looking for some help here.

0 Answers
Related