随笔分类 - react-static
摘要:项目出现错误的场景: 前端:react-static 定义 API 之后,在调用 API 时,报错: TypeError:Object(...) is not a function 完整错误如下: 上述错误主要原因是不能识别 .ts 文件,需要安装插件(react-static-plugin-typ
阅读全文
摘要:react-static : https://github.com/react-static/react-static if (typeof window 'undefined') { return; }
阅读全文
摘要:项目设计到技术: 后端:python/Django 前端:react-static react-static 相关文档: https://github.com/react-static/react-static 本地开发时,可以配置 dev proxy,将 /api/ 转发给需要的那个 django
阅读全文
摘要:与后端联调时,如果用到 IP 运行项目,只需要修改 package.json 中 start 即可,其他保持不变。 代码如下: "scripts": { "start": "set PORT=3000 HOST=10.10.12.152/ && react-static start", // ⚠️:
阅读全文