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
Webpacker support #234
Comments
Currently there is no way to make routes.js update automatically with webpack. You should either switch to static file and update it manually with rake task or include it separately via sprockets:
I am open to any proposal how to improve the process. |
I solve this in my project in a different way: |
The routes will be assigned to
|
Where do you put this file? How do you compile the erb? How do you keep the compiled file up to date on each |
I just created a file with the extension But yes, the compiled file won't be updated automatically on each route change (our ugly trick is actually to update the first line of the file with a comment containing the current time each time we change our routes). If you have any idea how to dispense with that, that would make my day ! |
@jorisvh Thanks you for the explanation. I've since improved upon it. Your timestamp comment is not far off from the solution to the auto-update problem you were having. If you're referring to
This will watch for changes in For more info, just check out rails-erb-loader, which webpacker uses under the hood. |
@padi Thanks so much for that add-on to the solution. This is all great! I wanted to add a little more info for clarity:
|
Is there a way to load routes.js file throught webpacker?
The text was updated successfully, but these errors were encountered: