Skip to content

Commit 55b8f14

Browse files
authored
Merge pull request #6 from devloco/3.1.2
3.1.2
2 parents 4eb8eb7 + c721753 commit 55b8f14

21 files changed

+84
-103
lines changed

packages/react-scripts/config/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (!NODE_ENV) {
2323
}
2424

2525
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
26-
var dotenvFiles = [
26+
const dotenvFiles = [
2727
`${paths.dotenv}.${NODE_ENV}.local`,
2828
`${paths.dotenv}.${NODE_ENV}`,
2929
// Don't include `.env.local` for `test` environment

packages/react-scripts/config/webpack.config.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ module.exports = function(webpackEnv) {
277277
},
278278
// Keep the runtime chunk separated to enable long term caching
279279
// https://twitter.com/wSokra/status/969679223278505985
280-
runtimeChunk: true,
280+
// https://github.com/facebook/create-react-app/issues/5358
281+
runtimeChunk: {
282+
name: entrypoint => `runtime-${entrypoint.name}`,
283+
},
281284
},
282285
resolve: {
283286
// This allows you to set a fallback for where Webpack should look for modules.
@@ -334,6 +337,7 @@ module.exports = function(webpackEnv) {
334337
use: [
335338
{
336339
options: {
340+
cache: true,
337341
formatter: require.resolve('react-dev-utils/eslintFormatter'),
338342
eslintPath: require.resolve('eslint'),
339343
resolvePluginsRelativeTo: __dirname,
@@ -348,7 +352,7 @@ module.exports = function(webpackEnv) {
348352
}
349353

350354
// We allow overriding the config only if the env variable is set
351-
if (process.env.EXTEND_ESLINT && eslintConfig) {
355+
if (process.env.EXTEND_ESLINT === 'true' && eslintConfig) {
352356
return eslintConfig;
353357
} else {
354358
return {
@@ -429,7 +433,8 @@ module.exports = function(webpackEnv) {
429433
// It enables caching results in ./node_modules/.cache/babel-loader/
430434
// directory for faster rebuilds.
431435
cacheDirectory: true,
432-
cacheCompression: isEnvProduction,
436+
// See #6846 for context on why cacheCompression is disabled
437+
cacheCompression: false,
433438
compact: isEnvProduction,
434439
},
435440
},
@@ -450,7 +455,8 @@ module.exports = function(webpackEnv) {
450455
],
451456
],
452457
cacheDirectory: true,
453-
cacheCompression: isEnvProduction,
458+
// See #6846 for context on why cacheCompression is disabled
459+
cacheCompression: false,
454460
// @remove-on-eject-begin
455461
cacheIdentifier: getCacheIdentifier(
456462
isEnvProduction
@@ -586,9 +592,10 @@ module.exports = function(webpackEnv) {
586592
),
587593
// Inlines the webpack runtime script. This script is too small to warrant
588594
// a network request.
595+
// https://github.com/facebook/create-react-app/issues/5358
589596
isEnvProduction &&
590597
shouldInlineRuntimeChunk &&
591-
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
598+
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
592599
// Makes some environment variables available in index.html.
593600
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
594601
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
@@ -688,7 +695,6 @@ module.exports = function(webpackEnv) {
688695
'!**/src/setupProxy.*',
689696
'!**/src/setupTests.*',
690697
],
691-
watch: paths.appSrc,
692698
silent: true,
693699
// The formatter is invoked directly in WebpackDevServerUtils during development
694700
formatter: isEnvProduction ? typescriptFormatter : undefined,

packages/react-scripts/config/webpack.config.wptheme.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
2727
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
2828
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2929
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
30-
// const paths = require('./paths'); // wptheme - remarked out
31-
const paths = require('./paths-wptheme'); // wptheme - added
30+
const paths = require('./paths-wptheme'); // wptheme modified
3231
const modules = require('./modules');
3332
const getClientEnvironment = require('./env');
3433
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
@@ -117,7 +116,7 @@ module.exports = function(webpackEnv) {
117116
// common function to get style loaders
118117
const getStyleLoaders = (cssOptions, preProcessor) => {
119118
const loaders = [
120-
isEnvDevelopment && require.resolve('style-loader'),
119+
// isEnvDevelopment && require.resolve('style-loader'),
121120
// isEnvProduction && // wptheme remarked out -- always use MiniCssExtractPlugin to generate css
122121
{
123122
loader: MiniCssExtractPlugin.loader,
@@ -204,8 +203,7 @@ module.exports = function(webpackEnv) {
204203
].filter(Boolean),
205204
output: {
206205
// The build folder.
207-
//path: isEnvProduction ? paths.appBuild : undefined, // wptheme remarked out
208-
path: isEnvProduction ? paths.appBuild : paths.appBuild, // wptheme added
206+
path: isEnvProduction ? paths.appBuild : paths.appBuild, // wptheme modified
209207
// Add /* filename */ comments to generated require()s in the output.
210208
pathinfo: isEnvDevelopment,
211209
// There will be one main bundle, and one file per asynchronous chunk.
@@ -254,7 +252,7 @@ module.exports = function(webpackEnv) {
254252
comparisons: false,
255253
// Disabled because of an issue with Terser breaking valid code:
256254
// https://github.com/facebook/create-react-app/issues/5250
257-
// Pending futher investigation:
255+
// Pending further investigation:
258256
// https://github.com/terser-js/terser/issues/120
259257
inline: 2,
260258
},
@@ -304,7 +302,10 @@ module.exports = function(webpackEnv) {
304302
},
305303
// Keep the runtime chunk separated to enable long term caching
306304
// https://twitter.com/wSokra/status/969679223278505985
307-
runtimeChunk: true,
305+
// https://github.com/facebook/create-react-app/issues/5358
306+
runtimeChunk: {
307+
name: entrypoint => `runtime-${entrypoint.name}`,
308+
},
308309
},
309310
resolve: {
310311
// This allows you to set a fallback for where Webpack should look for modules.
@@ -361,6 +362,7 @@ module.exports = function(webpackEnv) {
361362
use: [
362363
{
363364
options: {
365+
cache: true,
364366
formatter: require.resolve('react-dev-utils/eslintFormatter'),
365367
eslintPath: require.resolve('eslint'),
366368
resolvePluginsRelativeTo: __dirname,
@@ -375,7 +377,7 @@ module.exports = function(webpackEnv) {
375377
}
376378

377379
// We allow overriding the config only if the env variable is set
378-
if (process.env.EXTEND_ESLINT && eslintConfig) {
380+
if (process.env.EXTEND_ESLINT === 'true' && eslintConfig) {
379381
return eslintConfig;
380382
} else {
381383
return {
@@ -456,7 +458,8 @@ module.exports = function(webpackEnv) {
456458
// It enables caching results in ./node_modules/.cache/babel-loader/
457459
// directory for faster rebuilds.
458460
cacheDirectory: true,
459-
cacheCompression: isEnvProduction,
461+
// See #6846 for context on why cacheCompression is disabled
462+
cacheCompression: false,
460463
compact: isEnvProduction,
461464
},
462465
},
@@ -477,7 +480,8 @@ module.exports = function(webpackEnv) {
477480
],
478481
],
479482
cacheDirectory: true,
480-
cacheCompression: isEnvProduction,
483+
// See #6846 for context on why cacheCompression is disabled
484+
cacheCompression: false,
481485
// @remove-on-eject-begin
482486
cacheIdentifier: getCacheIdentifier(
483487
isEnvProduction
@@ -621,9 +625,10 @@ module.exports = function(webpackEnv) {
621625
),
622626
// Inlines the webpack runtime script. This script is too small to warrant
623627
// a network request.
628+
// https://github.com/facebook/create-react-app/issues/5358
624629
isEnvProduction &&
625630
shouldInlineRuntimeChunk &&
626-
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
631+
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
627632
// Makes some environment variables available in index.html.
628633
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
629634
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

packages/react-scripts/cra-original-package.json

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",
@@ -28,23 +28,23 @@
2828
},
2929
"types": "./lib/react-app.d.ts",
3030
"dependencies": {
31-
"@babel/core": "7.5.5",
31+
"@babel/core": "7.6.0",
3232
"@svgr/webpack": "4.3.2",
33-
"@typescript-eslint/eslint-plugin": "1.13.0",
34-
"@typescript-eslint/parser": "1.13.0",
35-
"babel-eslint": "10.0.2",
36-
"babel-jest": "^24.8.0",
33+
"@typescript-eslint/eslint-plugin": "^2.2.0",
34+
"@typescript-eslint/parser": "^2.2.0",
35+
"babel-eslint": "10.0.3",
36+
"babel-jest": "^24.9.0",
3737
"babel-loader": "8.0.6",
38-
"babel-plugin-named-asset-import": "^0.3.3",
39-
"babel-preset-react-app": "^9.0.1",
38+
"babel-plugin-named-asset-import": "^0.3.4",
39+
"babel-preset-react-app": "^9.0.2",
4040
"camelcase": "^5.2.0",
4141
"case-sensitive-paths-webpack-plugin": "2.2.0",
4242
"css-loader": "2.1.1",
4343
"dotenv": "6.2.0",
44-
"dotenv-expand": "4.2.0",
44+
"dotenv-expand": "5.1.0",
4545
"eslint": "^6.1.0",
46-
"eslint-config-react-app": "^5.0.1",
47-
"eslint-loader": "2.2.1",
46+
"eslint-config-react-app": "^5.0.2",
47+
"eslint-loader": "3.0.0",
4848
"eslint-plugin-flowtype": "3.13.0",
4949
"eslint-plugin-import": "2.18.2",
5050
"eslint-plugin-jsx-a11y": "6.2.3",
@@ -55,29 +55,29 @@
5555
"html-webpack-plugin": "4.0.0-beta.5",
5656
"identity-obj-proxy": "3.0.0",
5757
"is-wsl": "^1.1.0",
58-
"jest": "24.8.0",
58+
"jest": "24.9.0",
5959
"jest-environment-jsdom-fourteen": "0.1.0",
60-
"jest-resolve": "24.8.0",
61-
"jest-watch-typeahead": "0.3.1",
62-
"mini-css-extract-plugin": "0.5.0",
60+
"jest-resolve": "24.9.0",
61+
"jest-watch-typeahead": "0.4.0",
62+
"mini-css-extract-plugin": "0.8.0",
6363
"optimize-css-assets-webpack-plugin": "5.0.3",
6464
"pnp-webpack-plugin": "1.5.0",
6565
"postcss-flexbugs-fixes": "4.1.0",
6666
"postcss-loader": "3.0.0",
6767
"postcss-normalize": "7.0.1",
6868
"postcss-preset-env": "6.7.0",
6969
"postcss-safe-parser": "4.0.1",
70-
"react-app-polyfill": "^1.0.2",
71-
"react-dev-utils": "^9.0.3",
70+
"react-app-polyfill": "^1.0.3",
71+
"react-dev-utils": "^9.0.4",
7272
"resolve": "1.12.0",
7373
"resolve-url-loader": "3.1.0",
7474
"sass-loader": "7.2.0",
7575
"semver": "6.3.0",
7676
"style-loader": "1.0.0",
7777
"terser-webpack-plugin": "1.4.1",
78-
"ts-pnp": "1.1.2",
78+
"ts-pnp": "1.1.4",
7979
"url-loader": "2.1.0",
80-
"webpack": "4.39.1",
80+
"webpack": "4.40.2",
8181
"webpack-dev-server": "3.2.1",
8282
"webpack-manifest-plugin": "2.0.4",
8383
"workbox-webpack-plugin": "4.3.1"
@@ -90,7 +90,11 @@
9090
"fsevents": "2.0.7"
9191
},
9292
"browserslist": {
93-
"production": [">0.2%", "not dead", "not op_mini all"],
93+
"production": [
94+
">0.2%",
95+
"not dead",
96+
"not op_mini all"
97+
],
9498
"development": [
9599
"last 1 chrome version",
96100
"last 1 firefox version",

packages/react-scripts/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devloco/react-scripts-wptheme",
3-
"version": "3.1.1-wptheme-3.1.3",
3+
"version": "3.1.201",
44
"description": "Configuration and scripts for Create React WP Theme.",
55
"repository": "devloco/create-react-wptheme",
66
"author": "devloco",
@@ -41,23 +41,23 @@
4141
},
4242
"types": "./lib/react-app.d.ts",
4343
"dependencies": {
44-
"@babel/core": "7.5.5",
44+
"@babel/core": "7.6.0",
4545
"@svgr/webpack": "4.3.2",
46-
"@typescript-eslint/eslint-plugin": "1.13.0",
47-
"@typescript-eslint/parser": "1.13.0",
48-
"babel-eslint": "10.0.2",
49-
"babel-jest": "^24.8.0",
46+
"@typescript-eslint/eslint-plugin": "^2.2.0",
47+
"@typescript-eslint/parser": "^2.2.0",
48+
"babel-eslint": "10.0.3",
49+
"babel-jest": "^24.9.0",
5050
"babel-loader": "8.0.6",
51-
"babel-plugin-named-asset-import": "^0.3.3",
52-
"babel-preset-react-app": "^9.0.1",
51+
"babel-plugin-named-asset-import": "^0.3.4",
52+
"babel-preset-react-app": "^9.0.2",
5353
"camelcase": "^5.2.0",
5454
"case-sensitive-paths-webpack-plugin": "2.2.0",
5555
"css-loader": "2.1.1",
5656
"dotenv": "6.2.0",
57-
"dotenv-expand": "4.2.0",
57+
"dotenv-expand": "5.1.0",
5858
"eslint": "^6.1.0",
59-
"eslint-config-react-app": "^5.0.1",
60-
"eslint-loader": "2.2.1",
59+
"eslint-config-react-app": "^5.0.2",
60+
"eslint-loader": "3.0.0",
6161
"eslint-plugin-flowtype": "3.13.0",
6262
"eslint-plugin-import": "2.18.2",
6363
"eslint-plugin-jsx-a11y": "6.2.3",
@@ -68,34 +68,34 @@
6868
"html-webpack-plugin": "4.0.0-beta.5",
6969
"identity-obj-proxy": "3.0.0",
7070
"is-wsl": "^1.1.0",
71-
"jest": "24.8.0",
71+
"jest": "24.9.0",
7272
"jest-environment-jsdom-fourteen": "0.1.0",
73-
"jest-resolve": "24.8.0",
74-
"jest-watch-typeahead": "0.3.1",
75-
"mini-css-extract-plugin": "0.5.0",
73+
"jest-resolve": "24.9.0",
74+
"jest-watch-typeahead": "0.4.0",
75+
"mini-css-extract-plugin": "0.8.0",
7676
"optimize-css-assets-webpack-plugin": "5.0.3",
7777
"pnp-webpack-plugin": "1.5.0",
7878
"postcss-flexbugs-fixes": "4.1.0",
7979
"postcss-loader": "3.0.0",
8080
"postcss-normalize": "7.0.1",
8181
"postcss-preset-env": "6.7.0",
8282
"postcss-safe-parser": "4.0.1",
83-
"react-app-polyfill": "^1.0.2",
84-
"react-dev-utils": "^9.0.3",
83+
"react-app-polyfill": "^1.0.3",
84+
"react-dev-utils": "^9.0.4",
8585
"resolve": "1.12.0",
8686
"resolve-url-loader": "3.1.0",
8787
"sass-loader": "7.2.0",
8888
"semver": "6.3.0",
8989
"style-loader": "1.0.0",
9090
"terser-webpack-plugin": "1.4.1",
91-
"ts-pnp": "1.1.2",
91+
"ts-pnp": "1.1.4",
9292
"url-loader": "2.1.0",
93-
"webpack": "4.39.1",
93+
"webpack": "4.40.2",
9494
"webpack-dev-server": "3.2.1",
9595
"webpack-manifest-plugin": "2.0.4",
9696
"workbox-webpack-plugin": "4.3.1",
97-
"@devloco/react-scripts-wptheme-utils": "^3.1.1-wptheme-3.1.1",
98-
"@devloco/react-scripts-wptheme-error-overlay": "^3.1.1-wptheme-3.1.1"
97+
"@devloco/react-scripts-wptheme-utils": "^3.1.202",
98+
"@devloco/react-scripts-wptheme-error-overlay": "^3.1.200"
9999
},
100100
"devDependencies": {
101101
"react": "^16.8.4",
Binary file not shown.
Loading
Loading

packages/react-scripts/template-typescript/public/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"src": "logo512.png",
1717
"type": "image/png",
1818
"sizes": "512x512"
19-
}
19+
}
2020
],
2121
"start_url": ".",
2222
"display": "standalone",
Loading

packages/react-scripts/template-typescript/src/App.css

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
}
44

55
.App-logo {
6-
animation: App-logo-spin infinite 20s linear;
76
height: 40vmin;
8-
pointer-events: none;
97
}
108

119
.App-header {
@@ -20,14 +18,5 @@
2018
}
2119

2220
.App-link {
23-
color: #61dafb;
24-
}
25-
26-
@keyframes App-logo-spin {
27-
from {
28-
transform: rotate(0deg);
29-
}
30-
to {
31-
transform: rotate(360deg);
32-
}
21+
color: #09d3ac;
3322
}

0 commit comments

Comments
 (0)