-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Import a file that's not in the root directory #16
Comments
That's a good point - should support passing options onto vite in VitePress' config file. |
This no longer appears to work, especially if the |
@adamdehaven Hi, its working for me: https://github.com/brc-dd/vitepress-with-alias, can you create a separate issue with a minimal, reproducible example? |
@brc-dd what if your |
@adamdehaven You'll need a separate vite config file for that. I've updated the example. |
Hmm, I have that as well. Edit: haven't had time to come back to this yet (sorry for commenting then disappearing) |
Is your feature request related to a problem? Please describe.
Currently, I have a directory structure like :
The
docs
directory contains a vitepress app.If I'm not mistaken, that's not possible to import a file that's not in the docs directory (a
.vue
file fromsrc
directory for example).Describe the solution you'd like
I don't know what's the best solution to this problem.
But if we can add a custom vite resolver, it should work I guess ?Moreover, it would also be necessary to expose the vite watcher instance to watch these resolved files.Since the recent Vite features, we can alias a path to a fs directory, but in Vitepress, we can't override the vite configuration to add our aliases.
The text was updated successfully, but these errors were encountered: