首页 > 解决方案 > 部署到 netlify 时,create-react-app 上的空白页

问题描述

我正在尝试将 create-react-app(目前在 github 上)部署到 netlify。部署后它显示一个空白页面。

我添加的 Netlify 配置: 构建命令: yarn build, 发布目录: build

这是我在 package.json 上的脚本

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },

标签: reactjsdeploymentcreate-react-appnetlify

解决方案


在 Netlify 上部署后,我只在移动设备上得到空白页。在我从 Redux 商店中删除 REDUX DEVTOOLS EXTENSION 后,它起作用了。


推荐阅读