Skip to content

Conversation

@raman976
Copy link

@raman976 raman976 commented Dec 1, 2025

Fixes #14903

Changes

  • Fix content files not being copied when outDir is outside project directory
  • Add copyDotAstroFiles() function to copy .astro/ files to external outDir
  • Ensure content collections work consistently regardless of outDir location

Testing

  • Added content-outdir-external.test.js to verify files are copied to external outDir
  • Tested with mock scenarios to validate the fix resolves the reported issue
  • No existing functionality affected

Docs

No docs needed - this is a bug fix that restores expected behavior without changing the API.

@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2025

⚠️ No Changeset found

Latest commit: a36c36a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Dec 1, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 1, 2025

CodSpeed Performance Report

Merging #14938 will not alter performance

Comparing raman976:main (a36c36a) with main (c8ac8e5)

Summary

✅ 6 untouched

@Steffan153
Copy link
Contributor

If I understand this correctly, isn't this the opposite of what the issue was? These files were being generated with an external outDir, but not with an outDir inside the project directory. I thought it was because the files were being cleaned up with a normal outDir, but with an external one they didn't get cleaned up.

@raman976
Copy link
Author

raman976 commented Dec 1, 2025

Yeah ,I made a mistake in my first attempt at #14903. Totally misread it and was copying files when I should've been removing them. Fixed now in the latest commit! please review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra content-assets.mjs and content-modules.mjs files are generated when building with an outDir outside of the project directory

2 participants