Question about aliases #516
-
Hey all, Im working on an old rails project where we have vite a vue for some pages. Out sourceCodeDir is We decided to add Inertia to our Rails project, since it has a different structure than the plain old SPA, makes sense to have a new folder so I added My question. is there a way to alias Sorry if this was a topic somewhere, I couldn't find it in docs nor issues. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi Carlos. The In your case, if you configured This is covered briefly in Import Aliases, and in more detail in the Migration Guide. |
Beta Was this translation helpful? Give feedback.
-
Thank you @ElMassimo for your response, I have seted the sourceCodeDir to I manage alias to alias const sourceCodeDir = "app/frontend"
export default defineConfig({
resolve: {
alias: {
"#": path.resolve(__dirname, sourceCodeDir)
}
}, And this works just fine for components, but I also installed |
Beta Was this translation helpful? Give feedback.
Your editor might not have information on how to resolve
#
.Check your editor's documentation to find out how you can provide that information.
For example, with a
tsconfig.json
or ajsconfig.json
placed insideapp/frontend
:Remember to restart your editor after configuring these.