railsware / js-routes

Brings Rails named routes to javascript
http://railsware.github.io/js-routes/
MIT License
1.61k stars 151 forks source link

Use configured Webpacker directory instead of default #309

Closed pricci1 closed 1 year ago

pricci1 commented 1 year ago

Instead of assuming that the app is using the default path (/app/javascript), you could get the right one with Webpacker.config.source_path .

Currently, if /app/javascript is not being used, Sprockets is used.

https://github.com/railsware/js-routes/blob/ff9c32d82811d2ffda0acec7f37f7ec7af82b6af/lib/js_routes/configuration.rb#L78C7-L78C52