Skip to content
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

Astro's srcDir seems to be not supported #60

Closed
roll opened this issue Jun 26, 2024 · 3 comments · Fixed by withastro/starlight#2054
Closed

Astro's srcDir seems to be not supported #60

roll opened this issue Jun 26, 2024 · 3 comments · Fixed by withastro/starlight#2054

Comments

@roll
Copy link

roll commented Jun 26, 2024

Describe the bug

The plugin doesn't seem to be taking into an account srcDir

To Reproduce

  1. Have a config like this
// https://astro.build/config
export default defineConfig({
  srcDir: ".",
}
  1. Setup the blog
  2. Run astro build
  3. Fail with [vite]: Rollup failed to resolve import "/src/content/config.ts" from "virtual:starlight/collection-config".

Expected behavior

It builds instead of failing

How often does this bug happen?

Every time

System Info

No response

Additional Context

A temporary fix is just to have src/content/config.ts copy as well

@HiDeoo
Copy link
Owner

HiDeoo commented Jun 26, 2024

Thanks for the report 🙌

This turns out to be an issue in Starlight and I've opened withastro/starlight#2054 to fix the issue.

@HiDeoo
Copy link
Owner

HiDeoo commented Jun 28, 2024

Starlight 0.24.5 was just released with the fix for this issue.

I just tested locally with a custom srcDir using that latest Starlight version and now the build works fine as expected.

Thanks again for your report 🙌

@HiDeoo HiDeoo closed this as completed Jun 28, 2024
@roll
Copy link
Author

roll commented Jul 1, 2024

Thanks for taking car of it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants