Skip to content

Fix Cloudflare frontmatter scan default-import errors#16407

Open
0xbejaxer wants to merge 4 commits intowithastro:mainfrom
0xbejaxer:fix-16203-frontmatter-scan-default-export
Open

Fix Cloudflare frontmatter scan default-import errors#16407
0xbejaxer wants to merge 4 commits intowithastro:mainfrom
0xbejaxer:fix-16203-frontmatter-scan-default-export

Conversation

@0xbejaxer
Copy link
Copy Markdown
Contributor

@0xbejaxer 0xbejaxer commented Apr 20, 2026

Summary

  • fix the Cloudflare astro-frontmatter-scan dep-scan plugin so it always returns a synthetic default export when loading .astro files for dependency optimization
  • prevent esbuild dep-scan failures like No matching export ... for import "default" when .ts files default-import .astro components, while preserving existing frontmatter extraction and top-level-return handling
  • add a focused regression test + fixture that reproduces the default-import scan path and verifies those missing-default-export logs are not emitted

Validation

  • Full PR CI matrix is green (build, lint, test, E2E, platform matrix)
  • Added changeset

Fixes #16203.

Ensure astro-frontmatter-scan always returns a synthetic default export so TypeScript files that default-import .astro components do not fail dependency scanning with missing default export errors.

Made-with: Cursor
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 20, 2026

🦋 Changeset detected

Latest commit: 0d3a483

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions Bot added the pkg: integration Related to any renderer integration (scope) label Apr 20, 2026
Add the missing lockfile importer entry for the new Cloudflare test fixture so CI install with frozen lockfile succeeds.

Made-with: Cursor
@0xbejaxer
Copy link
Copy Markdown
Contributor Author

Hi maintainers — gentle bump on this PR when you get a chance.

It fixes the Cloudflare dep-scan default-export failure case and adds a focused regression test for the .ts default-import path.

Happy to make follow-up changes right away if you'd like a different approach.

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

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: astro-frontmatter-scan esbuild plugin missing namespace filter causes "No matching export" errors during dep scan

1 participant