You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/react-scripts/template/README.md
+15-4
Original file line number
Diff line number
Diff line change
@@ -301,7 +301,7 @@ In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and s
301
301
302
302
Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm.
303
303
304
-
The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine.
304
+
The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine.
305
305
306
306
## Formatting Code Automatically
307
307
@@ -1676,7 +1676,7 @@ Use the following [`launch.json`](https://code.visualstudio.com/docs/editor/debu
@@ -1996,7 +1996,7 @@ If you’re using [Apache HTTP Server](https://httpd.apache.org/), you need to c
1996
1996
RewriteRule ^index.html [QSA,L]
1997
1997
```
1998
1998
1999
-
It will get copied to the `build` folder when you run `npm run build`.
1999
+
It will get copied to the `build` folder when you run `npm run build`.
2000
2000
2001
2001
If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow [this Stack Overflow answer](https://stackoverflow.com/a/41249464/4878474).
2002
2002
@@ -2156,6 +2156,11 @@ or for a GitHub user page:
2156
2156
"homepage": "https://myusername.github.io",
2157
2157
```
2158
2158
2159
+
or for a custom domain page:
2160
+
```json
2161
+
"homepage": "https://mywebsite.com",
2162
+
```
2163
+
2159
2164
Create React App uses the `homepage` field to determine the root URLin the built HTML file.
2160
2165
2161
2166
#### Step 2: Install `gh-pages` and add `deploy` to `scripts`in`package.json`
@@ -2216,6 +2221,12 @@ Finally, make sure **GitHub Pages** option in your GitHub project settings is se
2216
2221
2217
2222
You can configure a custom domain with GitHub Pages by adding a `CNAME` file to the `public/` folder.
2218
2223
2224
+
Your CNAME file should look like this:
2225
+
2226
+
```
2227
+
mywebsite.com
2228
+
```
2229
+
2219
2230
#### Notes on client-side routing
2220
2231
2221
2232
GitHub Pages doesn’t support routers that use the HTML5`pushState` history API under the hood (for example, React Router using `browserHistory`). This is because when there is a fresh page load for a url like `http://user.github.io/todomvc/todos/42`, where `/todos/42` is a frontend route, the GitHub Pages server returns 404 because it knows nothing of`/todos/42`. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions:
@@ -2432,7 +2443,7 @@ To resolve this:
2432
2443
1. Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
2433
2444
* Note: Create React App can consume both CommonJS and ESmodules. ForNode.js compatibility, it is recommended that the main entry point is CommonJS. However, they can optionally provide an ESmodule entry point with the `module` field in`package.json`. Note that **even if a library provides an ES Modules version, it should still precompile other ES6 features to ES5if it intends to support older browsers**.
2434
2445
2435
-
2. Fork the package and publish a corrected version yourself.
2446
+
2. Fork the package and publish a corrected version yourself.
2436
2447
2437
2448
3. If the dependency is small enough, copy it to your `src/` folder and treat it as application code.
0 commit comments