egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.49k stars 209 forks source link

feat: support assets can be imported as strings #1026

Closed itancc closed 7 months ago

itancc commented 8 months ago

Added a plugin in order to Assets can be imported as strings using the ?raw suffix. Like vite. I think it's commonly used.

codesandbox[bot] commented 8 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

vercel[bot] commented 8 months ago

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 Oct 18, 2023 8:37am
ocavue commented 7 months ago

tsup supports custom esbuild plugin. So this feature could be done without editing tsup itself. For example, esbuild-plugin-raw can be used with tsup. Thanks for your contribution but maybe we should keep tsup itself small.