Skip to content

Commit 95137ca

Browse files
authored
Fix redirect for videoUploadingWebCodecs (#367)
Next.js redirects don't work for static-site generation.
1 parent 3e17be7 commit 95137ca

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

next.config.js

-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ module.exports = {
88
basePath: BASE_PATH,
99
compress: true,
1010
reactStrictMode: true,
11-
async redirects() {
12-
return [
13-
{
14-
source: `${BASE_PATH}/samples/videoUploadingWebCodecs`,
15-
destination: `${BASE_PATH}/samples/videoUploading?videoSource=videoFrame`,
16-
permanent: true,
17-
},
18-
]
19-
},
2011
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
2112
config.module.rules.push({
2213
test: /\.(png|jpe?g|gif|webm)$/i,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Head from 'next/head';
2+
3+
function Page(): JSX.Element {
4+
return (
5+
<Head>
6+
<meta
7+
httpEquiv="refresh"
8+
content={`0; url=${
9+
process.env.BASE_PATH || ''
10+
}/samples/videoUploading?videoSource=videoFrame`}
11+
></meta>
12+
</Head>
13+
);
14+
}
15+
16+
export default Page;

0 commit comments

Comments
 (0)