From bcba0c625bf8315e96124ad78277bd4a0ab24099 Mon Sep 17 00:00:00 2001 From: Austin Eng <2154796+austinEng@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:49:27 -0800 Subject: [PATCH] Attempt to fix videoUploadingWebCodecs redirect again (#368) define BASE_PATH so we don't try to evaluate it at runtime. It is only defined in the environment at build time. --- next.config.js | 1 + src/pages/samples/videoUploadingWebCodecs.tsx | 4 +--- src/types.d.ts | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/next.config.js b/next.config.js index 34df58c0..5ee292dc 100644 --- a/next.config.js +++ b/next.config.js @@ -27,6 +27,7 @@ module.exports = { const source = fs.readFileSync(v.module.userRequest, 'utf-8'); return JSON.stringify(source); // Strings need to be wrapped in quotes }, []), + BASE_PATH: JSON.stringify(process.env.BASE_PATH || ''), }) ); diff --git a/src/pages/samples/videoUploadingWebCodecs.tsx b/src/pages/samples/videoUploadingWebCodecs.tsx index 80e6ce21..6e863b62 100644 --- a/src/pages/samples/videoUploadingWebCodecs.tsx +++ b/src/pages/samples/videoUploadingWebCodecs.tsx @@ -5,9 +5,7 @@ function Page(): JSX.Element {
); diff --git a/src/types.d.ts b/src/types.d.ts index d32080f6..d3c73264 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -9,6 +9,7 @@ interface HTMLCanvasElement extends HTMLElement { } declare const __SOURCE__: string; +declare const BASE_PATH: string; // Defined by webpack. declare namespace NodeJS {