Skip to content

🎥 Make videos programmatically with React

`@remotion/three`: Fix bundling of ESM

Jonny Burger5c378ad7f4db
diff --git a/packages/three/bundle.ts b/packages/three/bundle.ts
index 7574b647d2..c7bdc0c08c 100644
--- a/packages/three/bundle.ts
+++ b/packages/three/bundle.ts
@@ -16,7 +16,9 @@ const output = await build({
});
const [file] = output.outputs;
-const text = await file.text();
+const text = (await file.text())
+ .replace(/jsxDEV/g, 'jsx')
+ .replace(/react\/jsx-dev-runtime/g, 'react/jsx-runtime');
await Bun.write('dist/esm/index.mjs', text);