-
Has someone set vite-rails on an engine? how would it fit with the main app? thanks for working on this project |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
@denjamio Check out this example Rails engine which is used in the example Rails app. That's the minimal setup required to get HMR when a dev server is running, and ensure it doesn't delete assets from the parent app. There's definitely room for improvement, specially when it comes to deployment. Make sure to use |
Beta Was this translation helpful? Give feedback.
-
hey all, I've been working on a Rails engine (https://github.com/maglevhq/maglev-core) and recently I've switched over to Vite Ruby. However, I had to modify the Rails Vite engine template:
Hope it will help other developers. |
Beta Was this translation helpful? Give feedback.
@denjamio Check out this example Rails engine which is used in the example Rails app.
See a live example.
That's the minimal setup required to get HMR when a dev server is running, and ensure it doesn't delete assets from the parent app.
There's definitely room for improvement, specially when it comes to deployment.
Make sure to use
vite_ruby@1.2.16
, as it contains a few improvements for the engine use case.