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
{{ message }}
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
When using the auto-imports with SSG, it is impossible to run npm run build without this error : RollupError: Could not resolve "./src/components/Header.astro" from "src/layouts/BaseLayout.astro"
This is because at build time, the paths seem to be relative to the path of the current file.
In this example BaseLayout imports Headerfrom /src/layouts/src/components/Header.astro
Problem is that ./ refers to ./src/layouts instead of / like expected.
I don't really know how to make it work (not a dev myself).
Your help appreciated.
Thanks for the library
PS : The same components and layouts display fine when doing npm run dev
The text was updated successfully, but these errors were encountered:
I am so sorry that I have no idea how to solve that.
TBH I stopped maintaining this lib for quite a long time. I'm not even using it myself for my Astro projects as I also encountered a bunch of problems too. Plugins are hard and they are quite mysterious as Vite uses different logic for dev and build. Thank you for using my lib anyway!
I love auto import. However sometimes auto imports are just messing my codebase and making it unpredictable. This lib is more like a practice for myself to create a Astro plugin.
I should probably archive this repo now.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using the auto-imports with SSG, it is impossible to run
npm run build
without this error :RollupError: Could not resolve "./src/components/Header.astro" from "src/layouts/BaseLayout.astro"
This is because at build time, the paths seem to be relative to the path of the current file.
In this example
BaseLayout
importsHeader
from/src/layouts/src/components/Header.astro
Problem is that
./
refers to./src/layouts
instead of/
like expected.I don't really know how to make it work (not a dev myself).
Your help appreciated.
Thanks for the library
PS : The same components and layouts display fine when doing
npm run dev
The text was updated successfully, but these errors were encountered: