Open shpaw415 opened 1 week ago
finaly found a workaround making
global.jsxDEV_7x81h0kn = jsxs
the fact that this is a const is friendly
For fixing the Parser import problem i used a runtime plugin
import { plugin, type BunPlugin } from "bun";
const reactFix: BunPlugin = {
name: "React-import-tmp-fix",
setup(runtime) {
runtime.onLoad(
{
filter: /\.tsx$/,
},
async (props) => {
const file = await Bun.file(props.path).text();
return {
contents:
`
import { jsxDEV as jsxDEV_7x81h0kn } from "react/jsx-dev-runtime";
` + file,
};
}
);
},
};
plugin(reactFix);
What version of Bun is running?
1.1.34+5e5e7c60f
What platform is your computer?
Linux 6.8.0-48-generic x86_64 x86_64
What steps can reproduce the bug?
NODE_ENV = production
What is the expected behavior?
bun version 1.1.32 was working correctly
What do you see instead?
build and import output the same error
jsxDEV_7x81h0kn is not a function. (In 'jsxDEV_7x81h0kn(DesignContainer, {}, void 0, !1, void 0, this)', 'jsxDEV_7x81h0kn' is undefined)
Additional information
No response