【发布时间】:2017-05-23 18:04:36
【问题描述】:
我正在使用 create-react-app 开发 ReactJS 应用程序。
npm start 和 npm run build 应用程序工作正常,应用程序在端口号 4000 或 pushstate-server build 在端口 9000 中运行,问题是我需要在没有端口号的情况下运行构建应用程序像http://sample/home/ 这样的公共网址,当我直接浏览 build/index.html 时,它会正确显示主页,但路由不像在端口中那样工作,所有的 css 和资产都显示未找到。
【问题讨论】:
标签: reactjs npm react-native bundle react-router