Open paperdave opened 2 months ago
1.1.20
No response
import { renderToReadableStream } from "react-dom/server"; console.log([renderToReadableStream]);
bun build input.ts --target=bun
to not generate this wrapper:
four references to __commonJS. auditing this manually, there should only be 3
__commonJS
There is code to specifically handle the pattern used by react/index.js here
react/index.js
'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = require('./cjs/react.production.js'); } else { module.exports = require('./cjs/react.development.js'); }
it no longer works, likely because the esm wrapper is being injected.
note: --minify-syntax helps this. but it should not be required
What version of Bun is running?
1.1.20
What platform is your computer?
No response
What steps can reproduce the bug?
bun build input.ts --target=bun
What is the expected behavior?
to not generate this wrapper:
What do you see instead?
four references to
__commonJS
. auditing this manually, there should only be 3Additional information
There is code to specifically handle the pattern used by
react/index.js
hereit no longer works, likely because the esm wrapper is being injected.