Skip to content

Commit 80aefa5

Browse files
committed
3.4.0 Updates
1 parent da4c6e7 commit 80aefa5

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ function getClientEnvironment(publicUrl) {
8585
// This should only be used as an escape hatch. Normally you would put
8686
// images into the `src` and `import` them in code to get their paths.
8787
PUBLIC_URL: publicUrl,
88+
// We support configuring the sockjs pathname during development.
89+
// These settings let a developer run multiple simultaneous projects.
90+
// They are used as the connection `hostname`, `pathname` and `port`
91+
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
92+
// and `sockPort` options in webpack-dev-server.
93+
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
94+
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
95+
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
8896
}
8997
);
9098
// Stringify all values so we can feed into Webpack DefinePlugin

packages/react-scripts/config/env.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dotenvFiles.forEach(dotenvFile => {
5454
// It works similar to `NODE_PATH` in Node itself:
5555
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
5656
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
57-
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
57+
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
5858
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
5959
// We also resolve them to make sure all tools using them work consistently.
6060
const appDirectory = fs.realpathSync(process.cwd());
@@ -65,7 +65,7 @@ process.env.NODE_PATH = (process.env.NODE_PATH || '')
6565
.join(path.delimiter);
6666

6767
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
68-
// injected into the application via DefinePlugin in Webpack configuration.
68+
// injected into the application via DefinePlugin in webpack configuration.
6969
const REACT_APP = /^REACT_APP_/i;
7070

7171
function getClientEnvironment(publicUrl) {
@@ -85,9 +85,17 @@ function getClientEnvironment(publicUrl) {
8585
// This should only be used as an escape hatch. Normally you would put
8686
// images into the `src` and `import` them in code to get their paths.
8787
PUBLIC_URL: publicUrl,
88+
// We support configuring the sockjs pathname during development.
89+
// These settings let a developer run multiple simultaneous projects.
90+
// They are used as the connection `hostname`, `pathname` and `port`
91+
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
92+
// and `sockPort` options in webpack-dev-server.
93+
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
94+
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
95+
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
8896
}
8997
);
90-
// Stringify all values so we can feed into Webpack DefinePlugin
98+
// Stringify all values so we can feed into webpack DefinePlugin
9199
const stringified = {
92100
'process.env': Object.keys(raw).reduce((env, key) => {
93101
env[key] = JSON.stringify(raw[key]);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts",
3-
"version": "3.3.1",
3+
"version": "3.4.0",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",
@@ -67,17 +67,17 @@
6767
"postcss-preset-env": "6.7.0",
6868
"postcss-safe-parser": "4.0.1",
6969
"react-app-polyfill": "^1.0.6",
70-
"react-dev-utils": "^10.1.0",
70+
"react-dev-utils": "^10.2.0",
7171
"resolve": "1.15.0",
7272
"resolve-url-loader": "3.1.1",
7373
"sass-loader": "8.0.2",
7474
"semver": "6.3.0",
75-
"style-loader": "1.1.3",
75+
"style-loader": "0.23.1",
7676
"terser-webpack-plugin": "2.3.4",
7777
"ts-pnp": "1.1.5",
7878
"url-loader": "2.3.0",
7979
"webpack": "4.41.5",
80-
"webpack-dev-server": "3.10.1",
80+
"webpack-dev-server": "3.10.2",
8181
"webpack-manifest-plugin": "2.2.0",
8282
"workbox-webpack-plugin": "4.3.1"
8383
},

packages/react-scripts/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devloco/react-scripts-wptheme",
3-
"version": "3.3.1-wp.2",
3+
"version": "3.4.0-wp.1",
44
"description": "Configuration and scripts for Create React WP Theme.",
55
"repository": {
66
"type": "git",
@@ -81,17 +81,17 @@
8181
"postcss-preset-env": "6.7.0",
8282
"postcss-safe-parser": "4.0.1",
8383
"react-app-polyfill": "^1.0.6",
84-
"react-dev-utils": "^10.1.0",
84+
"react-dev-utils": "^10.2.0",
8585
"resolve": "1.15.0",
8686
"resolve-url-loader": "3.1.1",
8787
"sass-loader": "8.0.2",
8888
"semver": "6.3.0",
89-
"style-loader": "1.1.3",
89+
"style-loader": "0.23.1",
9090
"terser-webpack-plugin": "2.3.4",
9191
"ts-pnp": "1.1.5",
9292
"url-loader": "2.3.0",
9393
"webpack": "4.41.5",
94-
"webpack-dev-server": "3.10.1",
94+
"webpack-dev-server": "3.10.2",
9595
"webpack-manifest-plugin": "2.2.0",
9696
"workbox-webpack-plugin": "4.3.1",
9797
"@devloco/create-react-wptheme-utils": "^3.3.1-wp.1"

0 commit comments

Comments
 (0)