Skip to content

Commit 9ac6541

Browse files
committed
Update 20.3
1 parent 0365a46 commit 9ac6541

21 files changed

+4690
-4126
lines changed

20/20.3/ssr-recipe/.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"/Users/velopert/5th/ssr-recipe/src/components/Blue.js":"1","/Users/velopert/5th/ssr-recipe/src/reportWebVitals.js":"2","/Users/velopert/5th/ssr-recipe/src/components/Menu.js":"3","/Users/velopert/5th/ssr-recipe/src/components/Red.js":"4","/Users/velopert/5th/ssr-recipe/src/index.js":"5"},{"size":138,"mtime":1606620619852,"results":"6","hashOfConfig":"7"},{"size":362,"mtime":1606620356327,"results":"8","hashOfConfig":"7"},{"size":267,"mtime":1606620619853,"results":"9","hashOfConfig":"7"},{"size":133,"mtime":1606620619855,"results":"10","hashOfConfig":"7"},{"size":593,"mtime":1606639193065,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"17mmh7m",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/velopert/5th/ssr-recipe/src/components/Blue.js",[],"/Users/velopert/5th/ssr-recipe/src/reportWebVitals.js",[],"/Users/velopert/5th/ssr-recipe/src/components/Menu.js",[],"/Users/velopert/5th/ssr-recipe/src/components/Red.js",[],"/Users/velopert/5th/ssr-recipe/src/index.js",[]]

20/20.3/ssr-recipe/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Getting Started with Create React App
2+
13
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
24

35
## Available Scripts
@@ -6,23 +8,23 @@ In the project directory, you can run:
68

79
### `yarn start`
810

9-
Runs the app in the development mode.<br />
11+
Runs the app in the development mode.\
1012
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1113

12-
The page will reload if you make edits.<br />
14+
The page will reload if you make edits.\
1315
You will also see any lint errors in the console.
1416

1517
### `yarn test`
1618

17-
Launches the test runner in the interactive watch mode.<br />
19+
Launches the test runner in the interactive watch mode.\
1820
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
1921

2022
### `yarn build`
2123

22-
Builds the app for production to the `build` folder.<br />
24+
Builds the app for production to the `build` folder.\
2325
It correctly bundles React in production mode and optimizes the build for the best performance.
2426

25-
The build is minified and the filenames include the hashes.<br />
27+
The build is minified and the filenames include the hashes.\
2628
Your app is ready to be deployed!
2729

2830
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
@@ -45,24 +47,24 @@ To learn React, check out the [React documentation](https://reactjs.org/).
4547

4648
### Code Splitting
4749

48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
50+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
4951

5052
### Analyzing the Bundle Size
5153

52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
54+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
5355

5456
### Making a Progressive Web App
5557

56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
58+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
5759

5860
### Advanced Configuration
5961

60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
62+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
6163

6264
### Deployment
6365

64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
66+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
6567

6668
### `yarn build` fails to minify
6769

68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
70+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

20/20.3/ssr-recipe/config/env.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ if (!NODE_ENV) {
1717
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
1818
const dotenvFiles = [
1919
`${paths.dotenv}.${NODE_ENV}.local`,
20-
`${paths.dotenv}.${NODE_ENV}`,
2120
// Don't include `.env.local` for `test` environment
2221
// since normally you expect tests to produce the same
2322
// results for everyone
2423
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
24+
`${paths.dotenv}.${NODE_ENV}`,
2525
paths.dotenv,
2626
].filter(Boolean);
2727

@@ -85,6 +85,11 @@ function getClientEnvironment(publicUrl) {
8585
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
8686
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
8787
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
88+
// Whether or not react-refresh is enabled.
89+
// react-refresh is not 100% stable at this time,
90+
// which is why it's disabled by default.
91+
// It is defined here so it is available in the webpackHotDevClient.
92+
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
8893
}
8994
);
9095
// Stringify all values so we can feed into webpack DefinePlugin

20/20.3/ssr-recipe/config/modules.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,8 @@ const resolve = require('resolve');
1414
function getAdditionalModulePaths(options = {}) {
1515
const baseUrl = options.baseUrl;
1616

17-
// We need to explicitly check for null and undefined (and not a falsy value) because
18-
// TypeScript treats an empty string as `.`.
19-
if (baseUrl == null) {
20-
// If there's no baseUrl set we respect NODE_PATH
21-
// Note that NODE_PATH is deprecated and will be removed
22-
// in the next major release of create-react-app.
23-
24-
const nodePath = process.env.NODE_PATH || '';
25-
return nodePath.split(path.delimiter).filter(Boolean);
17+
if (!baseUrl) {
18+
return '';
2619
}
2720

2821
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);

20/20.3/ssr-recipe/config/paths.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
'use strict';
22

33
const path = require('path');
44
const fs = require('fs');
@@ -7,7 +7,7 @@ const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath');
77
// Make sure any symlinks in the project folder are resolved:
88
// https://github.com/facebook/create-react-app/issues/637
99
const appDirectory = fs.realpathSync(process.cwd());
10-
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
10+
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
1111

1212
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
1313
// "public path" at which the app is served.
@@ -37,7 +37,7 @@ const moduleFileExtensions = [
3737

3838
// Resolve file paths in the same order as webpack
3939
const resolveModule = (resolveFn, filePath) => {
40-
const extension = moduleFileExtensions.find(extension =>
40+
const extension = moduleFileExtensions.find((extension) =>
4141
fs.existsSync(resolveFn(`${filePath}.${extension}`))
4242
);
4343

@@ -64,11 +64,10 @@ module.exports = {
6464
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
6565
proxySetup: resolveApp('src/setupProxy.js'),
6666
appNodeModules: resolveApp('node_modules'),
67+
swSrc: resolveModule(resolveApp, 'src/service-worker'),
68+
publicUrlOrPath,
6769
ssrIndexJs: resolveApp('src/index.server.js'),
6870
ssrBuild: resolveApp('dist'),
69-
publicUrlOrPath,
7071
};
7172

72-
73-
7473
module.exports.moduleFileExtensions = moduleFileExtensions;

0 commit comments

Comments
 (0)