Skip to content

🎥 Make videos programmatically with React

add another test

Jonny Burgere3983b700a25
diff --git a/packages/it-tests/package.json b/packages/it-tests/package.json
index 2c30968a48..ac6aab0e80 100644
--- a/packages/it-tests/package.json
+++ b/packages/it-tests/package.json
@@ -36,6 +36,7 @@
"@remotion/studio-server": "workspace:*",
"@remotion/studio-shared": "workspace:*",
"@remotion/transitions": "workspace:*",
+ "@remotion/webcodecs": "workspace:*",
"@types/sharp": "^0.28.5",
"create-video": "workspace:*",
"execa": "5.1.1",
diff --git a/packages/it-tests/src/test/bundle-sizes.test.ts b/packages/it-tests/src/test/bundle-sizes.test.ts
index dfb88356f3..29ab373662 100644
--- a/packages/it-tests/src/test/bundle-sizes.test.ts
+++ b/packages/it-tests/src/test/bundle-sizes.test.ts
@@ -21,3 +21,23 @@ test('Bundle size of media parser', async () => {
const [output] = result.outputs;
expect(output.size).toBeLessThan(200_000);
});
+
+test('Bundle size of webcodecs', async () => {
+ const content = `import {parseMedia} from "@remotion/media-parser"; console.log(parseMedia); import {convertMedia} from "@remotion/webcodecs"; console.log(convertMedia);`;
+ const entryPoint = path.join(__dirname, 'media-parser-index.ts');
+ await Bun.write(entryPoint, content);
+
+ const result = await Bun.build({
+ entrypoints: [entryPoint],
+ minify: true,
+ root: __dirname,
+ format: 'esm',
+ });
+ unlinkSync(entryPoint);
+ if (!result.success) {
+ throw new Error(result.logs.toString());
+ }
+
+ const [output] = result.outputs;
+ expect(output.size).toBeLessThan(200_000);
+});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 733c3767ef..40da9d192b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1279,6 +1279,9 @@ importers:
'@remotion/transitions':
specifier: workspace:*
version: link:../transitions
+ '@remotion/webcodecs':
+ specifier: workspace:*
+ version: link:../webcodecs
'@remotion/zod-types':
specifier: workspace:*
version: link:../zod-types