Skip to content

Commit 968c57d

Browse files
committed
demo: add with next.js
1 parent 80cd53e commit 968c57d

19 files changed

+10129
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ stats.html
1717
.vscode
1818
.setting
1919
build/
20+
.next/
2021
npm-debug.log*
2122
npm-error.log*
2223
yarn-debug.log*

demos/with-next/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

demos/with-next/.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

demos/with-next/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
## Getting Started
3+
4+
First, run the development server:
5+
6+
```bash
7+
# install dependencies
8+
pnpm install
9+
10+
# development
11+
pnpm run dev
12+
13+
# production build
14+
pnpm run build
15+
16+
# deploy
17+
pnpm run start
18+
```
19+
20+
## 组件说明
21+
22+
```tsx
23+
/**
24+
* 由于播放器sdk 内部有很多方法挂载在 window 上,所以需要将播放器组件放在客户端渲染
25+
*/
26+
const Player = dynamic(() => import('@/components/Player'), {
27+
ssr: false // This ensures the component is not SSR'd
28+
});
29+
```

demos/with-next/additional.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "ezuikit-js";

demos/with-next/next.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {}
3+
4+
module.exports = nextConfig

0 commit comments

Comments
 (0)