Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(react-utils): preserve directives with
bundle: true
Prior to this commit, we've had an issue where directives like `"use client"` gets stripped out of the `chunk-*` files created in the `dist` folder, when specifying `bundle: true` in `tsup.config.ts`. I tried to trace this issue and found a corresponding one in the `esbuild` repo (0). In that, i found that @Seojunhwan had created a ESBuild plugin (1) that resolves this issue. Though, as of this writing, the plugin doesn't support single-quote directives, which we have in our repository. I forked the repo and submitted a PR for that (2). Until then, i've published my fix under my personal namespace and use it here. [0]: evanw/esbuild#3115 [1]: https://github.com/Seojunhwan/esbuild-plugin-preserve-directives [2]: Seojunhwan/esbuild-plugin-preserve-directives#15
- Loading branch information