You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to connect Laravel's structure with Vitepress subfolder via Vite aliases. It works properly when using fileURLToPath(new URL('./path', import.meta.url)) to wrap the path, but it doesn't work with the simplified object notation.
Please share a repo or a stackblitz demo (https://vitepress.new) where we can verify this. Most likely the paths are not resolving properly in first case. Have you tried using '@blog': fileURLToPath(...) ? IIRC by default the paths are relative to project root rather than the config file. You can also try '@blog': '.vitepress/theme'
Sure. I created demo project where I import ExampleComponent with @components alias in Layout. I have commented out all the options for registering an alias using object notation that you can try. I expected one of them to work.
Describe the bug
I'm trying to connect Laravel's structure with Vitepress subfolder via Vite aliases. It works properly when using
fileURLToPath(new URL('./path', import.meta.url))
to wrap the path, but it doesn't work with the simplified object notation.Reproduction
Vitepress config file:
Expected behavior
As described in ViteJS docs:
If I haven't missed something, the configuration should work as follows:
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: