Best practices for structuring multiple Vue projects in a single Inertia.js app with Ruby backend #2584
Unanswered
pablo-vega-kloeckner-i
asked this question in
Help
Replies: 1 comment 2 replies
-
Do you mean managing directories and the overall structure of your project? I'm a big fan of DDD (domain-driven-design), but you may also choose a different approach, with projects depending on a custom package for example. You have to choose what works for you and your team. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone 👋
I'm working on an Inertia.js application using Ruby (Rails) as the server-side framework.
On the client side, I have a javascript/ directory structured like this:
Each
app1
andapp2
is a separate Vue 3 project with its own pages, composables, components, and logic. The shared/ folder contains reusable components, composables, and utilities that should be accessible by both apps.What I'm trying to achieve:
Cleanly separate app1 and app2 as independent Vue "frontends"
Use shared/ components between both apps
Properly configure Vite (or Webpack if needed) to handle multiple entry points
🔧 Questions:
What’s the best way to structure this using Inertia?
How should I configure Vite (or Webpack) to handle multiple Vue entry points and shared code?
How can I dynamically resolve pages with Inertia (e.g. resolve) across multiple apps?
Beta Was this translation helpful? Give feedback.
All reactions