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
> Note: this feature is available with `react-scripts@2.0.0` and higher.
31
31
32
-
Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br>
32
+
Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).
33
+
33
34
As of `react-scripts@2.0.0` you can import `.scss` files. This makes it possible to use a package's built-in Sass variables for global style preferences.
34
35
35
36
To enable `scss` in Create React App you will need to install `node-sass`.
Copy file name to clipboardexpand all lines: docusaurus/docs/importing-a-component.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@ id: importing-a-component
3
3
title: Importing a Component
4
4
---
5
5
6
-
This project setup supports ES6 modules thanks to Webpack.<br>
6
+
This project setup supports ES6 modules thanks to Webpack.
7
+
7
8
While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
Copy file name to clipboardexpand all lines: docusaurus/docs/post-processing-css.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -39,5 +39,6 @@ becomes this:
39
39
If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling).
40
40
41
41
[CSS Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) prefixing is disabled by default, but it will **not** strip manual prefixing.
42
-
If you'd like to opt-in to CSS Grid prefixing, [first familiarize yourself about its limitations](https://github.com/postcss/autoprefixer#does-autoprefixer-polyfill-grid-layout-for-ie).<br>
42
+
If you'd like to opt-in to CSS Grid prefixing, [first familiarize yourself about its limitations](https://github.com/postcss/autoprefixer#does-autoprefixer-polyfill-grid-layout-for-ie).
43
+
43
44
To enable CSS Grid prefixing, add `/* autoprefixer grid: autoplace */` to the top of your CSS file.
Copy file name to clipboardexpand all lines: docusaurus/docs/proxying-api-requests-in-development.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ sidebar_label: Proxying in Development
6
6
7
7
> Note: this feature is available with `react-scripts@0.2.3` and higher.
8
8
9
-
People often serve the front-end React app from the same host and port as their backend implementation.<br>
9
+
People often serve the front-end React app from the same host and port as their backend implementation.
10
+
10
11
For example, a production setup might look like this after the app is deployed:
11
12
12
13
/ - static server returns index.html with React app
@@ -31,7 +32,8 @@ Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-
31
32
32
33
Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`.
33
34
34
-
The `proxy` option supports HTTP, HTTPS and WebSocket connections.<br>
35
+
The `proxy` option supports HTTP, HTTPS and WebSocket connections.
36
+
35
37
If the `proxy` option is **not** flexible enough for you, alternatively you can:
36
38
37
39
-[Configure the proxy yourself](#configuring-the-proxy-manually)
@@ -96,10 +98,13 @@ You can now register proxies as you wish! Here's an example using the above `htt
Copy file name to clipboardexpand all lines: docusaurus/docs/running-tests.md
+9-5
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ id: running-tests
3
3
title: Running Tests
4
4
---
5
5
6
-
> Note: this feature is available with `react-scripts@0.3.0` and higher.<br>
6
+
> Note: this feature is available with `react-scripts@0.3.0` and higher.
7
7
8
8
> [Read the migration guide to learn how to enable it in older projects!](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-0.x.md#migrating-from-023-to-030)
9
9
@@ -60,7 +60,8 @@ it('sums numbers', () => {
60
60
});
61
61
```
62
62
63
-
All `expect()` matchers supported by Jest are [extensively documented here](https://jestjs.io/docs/en/expect.html#content).<br>
63
+
All `expect()` matchers supported by Jest are [extensively documented here](https://jestjs.io/docs/en/expect.html#content).
64
+
64
65
You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://jestjs.io/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions.
All Jest matchers are [extensively documented here](https://jestjs.io/docs/en/expect.html).<br>
148
+
All Jest matchers are [extensively documented here](https://jestjs.io/docs/en/expect.html).
149
+
148
150
Nevertheless you can use a third-party assertion library like [Chai](https://chaijs.com/) if you want to, as described below.
149
151
150
152
Additionally, you might find [jest-enzyme](https://github.com/blainekasten/enzyme-matchers) helpful to simplify your tests with readable matchers. The above `contains` code can be written more simply with jest-enzyme.
Copy file name to clipboardexpand all lines: docusaurus/docs/troubleshooting.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ sidebar_label: Troubleshooting
6
6
7
7
## `npm start` doesn’t detect changes
8
8
9
-
When you save a file while `npm start` is running, the browser should refresh with the updated code.<br>
9
+
When you save a file while `npm start` is running, the browser should refresh with the updated code.
10
+
10
11
If this doesn’t happen, try one of the following workarounds:
11
12
12
13
- Check that your file is imported by your entrypoint. TypeScript will show errors on any of your source files, but webpack only reloads your files if they are directly or indirectly imported by one of your entrypoints.
@@ -60,7 +61,8 @@ Please refer to [this section](deployment.md#resolving-heroku-deployment-errors)
60
61
61
62
If you use a [Moment.js](https://momentjs.com/), you might notice that only the English locale is available by default. This is because the locale files are large, and you probably only need a subset of [all the locales provided by Moment.js](https://momentjs.com/#multiple-locale-support).
62
63
63
-
To add a specific Moment.js locale to your bundle, you need to import it explicitly.<br>
64
+
To add a specific Moment.js locale to your bundle, you need to import it explicitly.
0 commit comments