Skip to content

Commit

Permalink
Fix redirect for videoUploadingWebCodecs (#367)
Browse files Browse the repository at this point in the history
Next.js redirects don't work for static-site generation.
  • Loading branch information
austinEng authored Mar 5, 2024
1 parent 3e17be7 commit 95137ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
9 changes: 0 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ module.exports = {
basePath: BASE_PATH,
compress: true,
reactStrictMode: true,
async redirects() {
return [
{
source: `${BASE_PATH}/samples/videoUploadingWebCodecs`,
destination: `${BASE_PATH}/samples/videoUploading?videoSource=videoFrame`,
permanent: true,
},
]
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
config.module.rules.push({
test: /\.(png|jpe?g|gif|webm)$/i,
Expand Down
16 changes: 16 additions & 0 deletions src/pages/samples/videoUploadingWebCodecs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Head from 'next/head';

function Page(): JSX.Element {
return (
<Head>
<meta
httpEquiv="refresh"
content={`0; url=${
process.env.BASE_PATH || ''
}/samples/videoUploading?videoSource=videoFrame`}
></meta>
</Head>
);
}

export default Page;

0 comments on commit 95137ca

Please sign in to comment.