Skip to content

fix(dev): add postinstall script to configure git symlinks on Windows#13398

Closed
mynameistito wants to merge 5 commits into
anomalyco:devfrom
mynameistito:fix/windows-symlinks
Closed

fix(dev): add postinstall script to configure git symlinks on Windows#13398
mynameistito wants to merge 5 commits into
anomalyco:devfrom
mynameistito:fix/windows-symlinks

Conversation

@mynameistito

@mynameistito mynameistito commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add script/windows-symlinks.ts that configures git symlinks on Windows
  • Add postinstall script to automatically run after bun install
  • Fixes TypeScript errors in symlinked .d.ts files on Windows

Problem

On Windows, git config core.symlinks defaults to false, causing git to write symlinks as plain text files. TypeScript then reads the symlink path string as code, resulting in errors like:

src/custom-elements.d.ts(1,1): error TS1128: Declaration or statement expected.

Solution

The postinstall script:

  1. Detects if running on Windows (exits early on other platforms)
  2. Enables core.symlinks in git config
  3. Restores the affected symlinked files from git index

Requirements

  • Windows 10+ with Developer Mode enabled, OR
  • Run terminal as Administrator

Closes #13397

@mynameistito mynameistito changed the title fix: add postinstall script to configure git symlinks on Windows fix(dev): add postinstall script to configure git symlinks on Windows Feb 13, 2026
@mynameistito

mynameistito commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

as discussed in discord, should not be changing git configs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git symlinks break TypeScript pre-push hooks on Windows

1 participant