diff --git a/frontend/package.json b/frontend/package.json index 487af014..ea86ef35 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "next dev", - "build": "next build", + "build": "next build --webpack", "start": "next start", "test": "tsx --test tests/*.test.ts", "test:db": "tsx --test --test-concurrency=1 tests/database-*.test.ts", diff --git a/frontend/tests/staging-backend-workflows.test.ts b/frontend/tests/staging-backend-workflows.test.ts index 61539f85..3e67d438 100644 --- a/frontend/tests/staging-backend-workflows.test.ts +++ b/frontend/tests/staging-backend-workflows.test.ts @@ -87,6 +87,7 @@ const railwayWebDockerfile = new URL( import.meta.url, ); const nextConfig = new URL("../next.config.ts", import.meta.url); +const frontendPackage = new URL("../package.json", import.meta.url); function read(url: URL): string { return readFileSync(url, "utf8"); @@ -129,7 +130,9 @@ test("changed staging workflows are syntactically valid YAML", () => { test("railway web image uses Next standalone runtime output", () => { const dockerfile = read(railwayWebDockerfile); const config = read(nextConfig); + const packageJson = JSON.parse(read(frontendPackage)) as { scripts?: { build?: string } }; + assert.equal(packageJson.scripts?.build, "next build --webpack"); assert.match(config, /output: "standalone"/); assert.match(config, /outputFileTracingRoot: repositoryRoot/); assert.match(dockerfile, /RUN npm run build\n/);