Skip to content

Commit

Permalink
Merge pull request #1 from facebook/master
Browse files Browse the repository at this point in the history
Update from upstream repo facebook/create-react-app@master
  • Loading branch information
cloud-walker committed Mar 23, 2018
2 parents 0b1d636 + cb1608b commit 4f3b561
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Expand Up @@ -45,12 +45,12 @@ module.exports = (resolve, rootDir, isEjecting) => {
},
moduleFileExtensions: [
'web.js',
'mjs',
'js',
'json',
'web.jsx',
'jsx',
'node',
'mjs',
],
};
if (rootDir) {
Expand Down
10 changes: 10 additions & 0 deletions packages/react-scripts/template/README.md
Expand Up @@ -2209,6 +2209,16 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://reacttraining.com/react-router/web/api/Router) about different history implementations in React Router.
* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).

#### Troubleshooting

##### "/dev/tty: No such a device or address"

If, when deploying, you get `/dev/tty: No such a device or address` or a similar error, try the follwing:

1. Create a new [Personal Access Token](https://github.com/settings/tokens)
2. `git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>` .
3. Try `npm run deploy again`

### [Heroku](https://www.heroku.com/)

Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>
Expand Down

0 comments on commit 4f3b561

Please sign in to comment.