🎥 Make videos programmatically with React
compile lambda with 0 warnings and with 1.5MB less size
Jonny Burger2b87c80ae38e
diff --git a/packages/it-tests/src/lambda/lambda-browser-bundle.test.ts b/packages/it-tests/src/lambda/lambda-browser-bundle.test.tsindex 993dc50759..2732f5e13c 100644--- a/packages/it-tests/src/lambda/lambda-browser-bundle.test.ts+++ b/packages/it-tests/src/lambda/lambda-browser-bundle.test.ts@@ -1,7 +1,7 @@-import path from "path";-import { tmpdir } from "os";-import fs from "fs";import { BundlerInternals } from "@remotion/bundler";+import fs from "fs";+import { tmpdir } from "os";+import path from "path";import { describe, expect, test } from "vitest";test("Should not be able to bundle @remotion/lambda directly", async () => {@@ -20,21 +20,21 @@ describe("Should be able to bundle @remotion/lambda/client with ESBuild", () =>const outfile = path.join(tmpdir(), "esbuild-test.js");test("Should build without errors", async () => {- const { errors } = await BundlerInternals.esbuild.build({+ const { errors, warnings } = await BundlerInternals.esbuild.build({platform: "node",target: "node14",bundle: true,- logLevel: "silent",outfile,entryPoints: [require.resolve("@remotion/lambda/client")],});expect(errors.length).toBe(0);+ expect(warnings.length).toBe(0);});- test("Bundle should be below 6MB", async () => {+ test("Bundle should be below 4.5MB", async () => {const file = await fs.promises.readFile(outfile, "utf-8");expect(file.length).toBeGreaterThan(10000);- expect(file.length).toBeLessThanOrEqual(6000000);+ expect(file.length).toBeLessThanOrEqual(4500000);});test("Bundle should not include Renderer", async () => {