【项目】MyRoom 调整与优化
Dandelion 8/1/2022 project
# 请求跨域
借助 vercel 云端服务器作为中间代理
全局安装 vercel,进行 vercel api 接口的测试:
npm install -g vercel
配置 vercel.json
{ "routes": [ { "handle": "filesystem" }, { "src": "/(.*)", "dest": "/index.html" } ] }
1
2
3
4
5
6
# vite 使用
- 修改文件后缀:js -> jsx
# nextjs 使用
- Server-Side Rendering/Static Site Generation/Client-Side Rendering
- 注意以下文件的使用
- pages/index.js
- pages/_app.js
- styles/global.css
- next.config.js (如何引入第三方库 ... )
- 参考
# 项目展示
- 客户端渲染
- 服务端渲染
- 性能对比(开发者工具:Performance insights)