-
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: 3 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.
-
First, thank you for this very useful tool! We're using an engine to add common shared functionality to some applications mounting the engine via gem. Like others described here too. But now i am stuck, shurely missing an important bit of the bundling:
In the engine we are using "@hotwired/stimulus", which is defined in its package.json. What is needed to knit it all together for deployment? @ElMassimo could you give a hint? Thank you for any help! |
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
[email protected]
, as it contains a few improvements for the engine use case.