Skip to content

Commit

Permalink
fix : Video 렌더링 안되는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-Dongwook committed Oct 21, 2024
1 parent 7f9a1e3 commit 56cc6d2
Show file tree
Hide file tree
Showing 11 changed files with 3,758 additions and 625 deletions.
5 changes: 4 additions & 1 deletion client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ NEXT_PUBLIC_API_URL=
NEXTAUTH_URL=
NEXTAUTH_SECRET=
JWT_SECRET=
MONGODB_URI=
MONGODB_URI=
MUX_TOKEN_ID=
MUX_TOKEN_SECRET=
MUX_PLAYER_PLAYBACKID=
7 changes: 7 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# next-video
videos/*
!videos/*.json
!videos/*.js
!videos/*.ts
public/_next-video
19 changes: 11 additions & 8 deletions client/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { withNextVideo } from "next-video/process";
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
Expand All @@ -9,18 +10,20 @@ const nextConfig = {

config.module.rules.push({
test: /\.(mp4|webm|ogg|swf|avi)$/,
use: {
loader: "file-loader",
options: {
outputPath: "static/videos",
publicPath: "/_next/static/videos",
name: "[name].[hash].[ext]",
use: [
{
loader: "file-loader",
options: {
outputPath: "static/videos",
publicPath: "/_next/static/videos",
name: "[name].[hash].[ext]",
},
},
},
],
});

return config;
},
};

export default nextConfig;
export default withNextVideo(nextConfig);
Loading

0 comments on commit 56cc6d2

Please sign in to comment.