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: docusaurus/docs/adding-a-css-modules-stylesheet.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ sidebar_label: Adding CSS Modules
8
8
9
9
This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the `[name].module.css` file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format `[filename]\_[classname]\_\_[hash]`.
10
10
11
-
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](/docs/adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
11
+
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](adding-a-sass-stylesheet.md) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
12
12
13
13
CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules [here](https://css-tricks.com/css-modules-part-1-need/).
Copy file name to clipboardexpand all lines: docusaurus/docs/adding-a-router.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,4 +19,4 @@ yarn add react-router-dom
19
19
20
20
To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reacttraining.com/react-router/web/example/basic) is a good place to get started.
21
21
22
-
Note that [you may need to configure your production server to support client-side routing](/docs/deployments#serving-apps-with-client-side-routing) before deploying your app.
22
+
Note that [you may need to configure your production server to support client-side routing](deployment.md#serving-apps-with-client-side-routing) before deploying your app.
> Note: this feature is available with `react-scripts@0.2.3` and higher.
7
8
8
9
Your project can consume variables declared in your environment as if they were declared locally in your JS files. By
9
10
default you will have `NODE_ENV` defined for you, and any other environment variables starting with
10
11
`REACT_APP_`.
11
12
12
-
**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](/docs/injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them.
13
+
**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](title-and-meta-tags.md#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them.
13
14
14
15
> Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebook/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running.
15
16
@@ -77,7 +78,7 @@ You can also access the environment variables starting with `REACT_APP_` in the
77
78
Note that the caveats from the above section apply:
78
79
79
80
- Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work.
80
-
- The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](/docs/generating-dynamic-meta-tags-on-the-server).
81
+
- The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](title-and-meta-tags.md#generating-dynamic-meta-tags-on-the-server).
81
82
82
83
## Adding Temporary Environment Variables In Your Shell
Copy file name to clipboardexpand all lines: docusaurus/docs/advanced-configuration.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,15 @@ id: advanced-configuration
3
3
title: Advanced Configuration
4
4
---
5
5
6
-
You can adjust various development and production settings by setting environment variables in your shell or with [.env](/docs/adding-development-environment-variables-in-env).
6
+
You can adjust various development and production settings by setting environment variables in your shell or with [.env](adding-custom-environment-variables.md#adding-development-environment-variables-in-env).
| BROWSER | ✅ Used | 🚫 Ignored | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. If you need to customize the way the browser is launched, you can specify a node script instead. Any arguments passed to `npm start` will also be passed to this script, and the url where your app is served will be the last argument. Your script's file name must have the `.js` extension. |
11
11
| HOST | ✅ Used | 🚫 Ignored | By default, the development web server binds to `localhost`. You may use this variable to specify a different host. |
12
12
| PORT | ✅ Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
13
13
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
14
-
| PUBLIC_URL | 🚫 Ignored | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](/docs/deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
14
+
| PUBLIC_URL | 🚫 Ignored | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included.md). This may be particularly useful when using a CDN to host your application.|
15
15
| CI | ✅ Used | ✅ Used | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. |
16
16
| REACT_EDITOR | ✅ Used | 🚫 Ignored | When an app crashes in development, you will see an error overlay with clickable stack trace. When you click on it, Create React App will try to determine the editor you are using based on currently running processes, and open the relevant source file. You can [send a pull request to detect your editor of choice](https://github.com/facebook/create-react-app/issues/2636). Setting this environment variable overrides the automatic detection. If you do it, make sure your systems [PATH](<https://en.wikipedia.org/wiki/PATH_(variable)>) environment variable points to your editor’s bin folder. You can also set it to `none` to disable it completely. |
17
17
| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. |
Copy file name to clipboardexpand all lines: docusaurus/docs/alternatives-to-ejecting.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@ id: alternatives-to-ejecting
3
3
title: Alternatives to Ejecting
4
4
---
5
5
6
-
[Ejecting](/docs/available-scripts#npm-run-eject) lets you customize anything, but from that point on you have to maintain the configuration and scripts yourself. This can be daunting if you have many similar projects. In such cases instead of ejecting we recommend to _fork_`react-scripts` and any other packages you need. [This article](https://auth0.com/blog/how-to-configure-create-react-app/) dives into how to do it in depth. You can find more discussion in [this issue](https://github.com/facebook/create-react-app/issues/682).
6
+
[Ejecting](available-scripts.md#npm-run-eject) lets you customize anything, but from that point on you have to maintain the configuration and scripts yourself. This can be daunting if you have many similar projects. In such cases instead of ejecting we recommend to _fork_`react-scripts` and any other packages you need. [This article](https://auth0.com/blog/how-to-configure-create-react-app/) dives into how to do it in depth. You can find more discussion in [this issue](https://github.com/facebook/create-react-app/issues/682.md).
Copy file name to clipboardexpand all lines: docusaurus/docs/deployment.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -79,11 +79,11 @@ If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow
79
79
80
80
Now requests to `/todos/42` will be handled correctly both in development and in production.
81
81
82
-
On a production build, and when you've [opted-in](/docs/making-a-progressive-web-app#why-opt-in),
82
+
On a production build, and when you've [opted-in](making-a-progressive-web-app.md#why-opt-in),
83
83
a [service worker](https://developers.google.com/web/fundamentals/primers/service-workers/) will automatically handle all navigation requests, like for
84
84
`/todos/42`, by serving the cached copy of your `index.html`. This
85
85
service worker navigation routing can be configured or disabled by
86
-
[`eject`ing](/docs/available-scripts#npm-run-eject) and then modifying the
86
+
[`eject`ing](available-scripts.md#npm-run-eject) and then modifying the
Copy file name to clipboardexpand all lines: docusaurus/docs/setting-up-your-editor.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco
63
63
}
64
64
```
65
65
66
-
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](/docs/advanced-configuration).
66
+
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](advanced-configuration.md).
67
67
68
68
Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
69
69
@@ -75,7 +75,7 @@ You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetB
75
75
76
76
In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration.
77
77
78
-
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](/docs/advanced-configuration).
78
+
> Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](advanced-configuration.md).
79
79
80
80
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.
0 commit comments