Skip to content

Fix windows build issue with import alias#15112

Merged
ematipico merged 1 commit intonextfrom
hd/fix-alias-tsconfig-windows
Jan 6, 2026
Merged

Fix windows build issue with import alias#15112
ematipico merged 1 commit intonextfrom
hd/fix-alias-tsconfig-windows

Conversation

@HiDeoo
Copy link
Copy Markdown
Member

@HiDeoo HiDeoo commented Jan 5, 2026

Changes

Initially reported on Discord, this PR fixes a Windows-specific build issue when importing an Astro component with a <script> tag using an import alias.

  • Repro (the repro includes MDX, but turns out the issue is not MDX-related)
  • The custom resolver used in the vite plugin to alias paths needs to return normalized paths.

Testing

  • Added a new component Qux.astro with a <script> tag to the existing alias-tsconfig fixture, imported it using an alias.
    • The associated test fails to build the fixture on Windows before the fix.
    • The build succeeds after the fix.
  • Also tested the fix with a local patch on the Starlight repo where the issue was originally reported.
    • The build succeeds on Windows after applying the fix.

Docs

This is a bug fix; no doc updates are needed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 5, 2026

🦋 Changeset detected

Latest commit: d63218b

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: astro Related to the core `astro` package (scope) label Jan 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 5, 2026

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
ts-api-utils provenance none
undici provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

Copy link
Copy Markdown
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple fix, thank you!

@ematipico ematipico merged commit 5751d2b into next Jan 6, 2026
22 checks passed
@ematipico ematipico deleted the hd/fix-alias-tsconfig-windows branch January 6, 2026 07:49
@HiDeoo HiDeoo mentioned this pull request Jan 6, 2026
10 tasks
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.

3 participants