@remotion/player
Version:
React component for embedding a Remotion preview into your app
20 lines (14 loc) • 449 B
text/typescript
import {build} from 'bun';
if (process.env.NODE_ENV !== 'production') {
throw new Error('This script must be run using NODE_ENV=production');
}
const output = await build({
entrypoints: ['src/index.ts'],
naming: '[name].mjs',
target: 'node',
external: ['remotion', 'remotion/no-react', 'react'],
});
const [file] = output.outputs;
const text = await file.text();
await Bun.write('dist/esm/index.mjs', `"use client";\n${text}`);
export {};