Skip to content

🎥 Make videos programmatically with React

replace motion blur with bun build

Jonny Burgerc3a0f17e8f4d
diff --git a/packages/motion-blur/bundle.ts b/packages/motion-blur/bundle.ts
new file mode 100644
index 0000000000..b6fef6a414
--- /dev/null
+++ b/packages/motion-blur/bundle.ts
@@ -0,0 +1,14 @@
+import {build} from 'bun';
+
+const output = await build({
+ entrypoints: ['src/index.ts'],
+ naming: '[name].mjs',
+ external: ['react', 'remotion', 'remotion/no-react', 'react/jsx-runtime'],
+});
+
+const [file] = output.outputs;
+const text = await file.text();
+
+await Bun.write('dist/esm/index.mjs', text);
+
+export {};
diff --git a/packages/motion-blur/package.json b/packages/motion-blur/package.json
index 3c918076d2..74249bb7ba 100644
--- a/packages/motion-blur/package.json
+++ b/packages/motion-blur/package.json
@@ -10,7 +10,7 @@
"formatting": "prettier src --check",
"lint": "eslint src --ext ts,tsx",
"watch": "tsc -w",
- "build": "rollup --config rollup.config.js && tsc -d"
+ "build": "bun bundle.ts && tsc -d"
},
"author": "Matt McGillivray, Ilija Boshkov <[email protected]>, Jonny Burger <[email protected]>",
"contributors": [],
diff --git a/packages/motion-blur/rollup.config.js b/packages/motion-blur/rollup.config.js
deleted file mode 100644
index 145571d05a..0000000000
--- a/packages/motion-blur/rollup.config.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// rollup.config.js
-import typescript from '@rollup/plugin-typescript';
-
-export default [
- {
- input: 'src/index.ts',
- output: [
- {
- file: 'dist/esm/index.mjs',
- format: 'es',
- sourcemap: false,
- },
- ],
- external: ['react', 'remotion', 'react/jsx-runtime'],
- plugins: [
- typescript({
- tsconfig: 'tsconfig-esm.json',
- sourceMap: false,
- outputToFilesystem: true,
- }),
- ],
- },
-];
diff --git a/packages/motion-blur/tsconfig-esm.json b/packages/motion-blur/tsconfig-esm.json
deleted file mode 100644
index 805e1f04d2..0000000000
--- a/packages/motion-blur/tsconfig-esm.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "extends": "../tsconfig-esm.settings.json",
- "compilerOptions": {
- "rootDir": "./src",
- "outDir": "./dist/esm",
- "skipLibCheck": true,
- "jsx": "react-jsx",
- "moduleResolution": "node"
- },
- "references": [{"path": "../core"}],
- "include": ["./src"]
-}