【发布时间】:2018-03-17 15:29:00
【问题描述】:
我有一个基本的 React 应用程序。没有后台。我想在 github 页面上设置它。我关注了这篇文章,两次。 https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089
Github Pages 两次都在我的公共文件夹中显示 README.md 文件而不是 index.html 文件。这是应用程序文件目录的图像。有什么想法吗?
如果重要的话,这是我在 package.json 中的内容:
{
"name": "react-blog",
"version": "0.1.0",
"private": true,
"homepage": "https://jackseabolt.github.io/react-blog/",
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy" : "npm run build&&gh-pages -d build"
},
"devDependencies": {
"gh-pages": "^1.0.0"
}
}
【问题讨论】:
-
这并不能解决问题。这是一个反应项目,这个答案不适用。它破坏了构建
标签: reactjs github-pages