Open sentience opened 9 months ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
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 |
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.
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.