这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@sentience
Copy link

Fixes #1001.

This removes rollup-plugin-hashbang from the configuration of Rollup that is used to generate DTS files. In theory, this plug-in is not needed for this build. rollup-plugin-hashbang remains in the configuration used when invoking Rollup to perform treeshaking.

The root cause of the issue may be inside rollup-plugin-hashbang, and a better fix might be possible there.

I have added a test to cover the issue being fixed, but it's possible this has broken something not covered by the existing tests.

@codesandbox
Copy link

codesandbox bot commented Sep 18, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Sep 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2023 6:23am

@sentience
Copy link
Author

Note: this removes the shebang from .d.ts and .d.mts files generated by tsup --dts.

dist/scripts/extract.d.ts before:

#!/usr/bin/env node

dist/scripts/extract.d.ts after:

export { }

I believe this is correct. A shebang line in a .d.ts file doesn't seem to make any sense to me.

@sxzz sxzz force-pushed the dev branch 2 times, most recently from 115a451 to 57654f6 Compare July 16, 2024 21:02
@sxzz sxzz deleted the branch egoist:main September 17, 2024 05:23
@sxzz sxzz closed this Sep 17, 2024
@sxzz sxzz reopened this Sep 17, 2024
@sxzz sxzz changed the base branch from dev to main September 17, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Race condition causing errors chmod'ing DTS files with shebangs

2 participants