-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to disable esm shim? #468
Comments
There are some reasons, for example, there is a TS file that is const fetch = globalThis.fetch === 'undefined' ? require('node-fetch') : fetch I won't have |
If you disable the esm shim then the bundled code will be incorrect? How the require is supposed to be handled. I feel like you should just do polyfill on server side chunks or exports if that can solve your case. |
For example Im writing the polyfill code in a function it will both emit to cjs and esm. And in this case require function shouldn’t cause a side effect |
It would cause other error if you don't shim |
bunchee/src/build-config.ts
Line 278 in c4fd618
The text was updated successfully, but these errors were encountered: