Skip to content

fix(config): handle shebang properly - #21158

Merged
sapphi-red merged 2 commits into
mainfrom
fix/handle-shebang-in-config-file
Nov 27, 2025
Merged

sapphi-red merged 2 commits into
mainfrom
fix/handle-shebang-in-config-file

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Nov 26, 2025
Comment thread packages/vite/src/node/config.ts Resolved
Comment thread packages/vite/src/node/config.ts Resolved
@bluwy

bluwy commented Nov 26, 2025

Copy link
Copy Markdown
Member

I'm a bit confused of the original issue. Why would someone add a shebang to the config file?

@sapphi-red

Copy link
Copy Markdown
Member Author

I think it is to run vite by ./vite.config.ts. To do that, you would need to add #!/usr/bin/env -S node ./node_modules/vite/bin/vite.js -c to the config.

@bluwy

bluwy commented Nov 27, 2025

Copy link
Copy Markdown
Member

Hmm, feels a bit strange of a pattern but I guess it's not a lot of work to support it.

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

Labels

p2-edge-case Bug, but has workaround or limited in scope (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants