Skip to content

Commit da654e6

Browse files
author
Morten N.O. Nørgaard Henriksen
authored
Update Webpack dependencies and fix minor issues (#11170)
1 parent aaddb29 commit da654e6

File tree

9 files changed

+39
-136
lines changed

9 files changed

+39
-136
lines changed

packages/babel-preset-react-app/create.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,24 @@ module.exports = function (api, opts, env) {
146146
// class { handleClick = () => { } }
147147
// Enable loose mode to use assignment instead of defineProperty
148148
// See discussion in https://github.com/facebook/create-react-app/issues/4263
149+
// Note:
150+
// 'loose' mode configuration must be the same for
151+
// * @babel/plugin-proposal-class-properties
152+
// * @babel/plugin-proposal-private-methods
153+
// * @babel/plugin-proposal-private-property-in-object
154+
// (when they are enabled)
149155
[
150156
require('@babel/plugin-proposal-class-properties').default,
151157
{
152158
loose: true,
153159
},
154160
],
161+
[
162+
require('@babel/plugin-proposal-private-methods').default,
163+
{
164+
loose: true,
165+
},
166+
],
155167
// Adds Numeric Separators
156168
require('@babel/plugin-proposal-numeric-separator').default,
157169
// Polyfills the runtime needed for async/await, generators, and friends

packages/babel-preset-react-app/package.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@
2121
"test.js"
2222
],
2323
"dependencies": {
24-
"@babel/core": "7.12.3",
25-
"@babel/plugin-proposal-class-properties": "7.12.1",
26-
"@babel/plugin-proposal-decorators": "7.12.1",
27-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.12.1",
28-
"@babel/plugin-proposal-numeric-separator": "7.12.1",
29-
"@babel/plugin-proposal-optional-chaining": "7.12.1",
30-
"@babel/plugin-transform-flow-strip-types": "7.12.1",
31-
"@babel/plugin-transform-react-display-name": "7.12.1",
32-
"@babel/plugin-transform-runtime": "7.12.1",
33-
"@babel/preset-env": "7.12.1",
34-
"@babel/preset-react": "7.12.1",
35-
"@babel/preset-typescript": "7.12.1",
36-
"@babel/runtime": "7.12.1",
37-
"babel-plugin-macros": "2.8.0",
24+
"@babel/core": "7.14.6",
25+
"@babel/plugin-proposal-class-properties": "7.14.5",
26+
"@babel/plugin-proposal-decorators": "7.14.5",
27+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.14.5",
28+
"@babel/plugin-proposal-numeric-separator": "7.14.5",
29+
"@babel/plugin-proposal-optional-chaining": "7.14.5",
30+
"@babel/plugin-proposal-private-methods": "7.14.5",
31+
"@babel/plugin-transform-flow-strip-types": "7.14.5",
32+
"@babel/plugin-transform-react-display-name": "7.14.5",
33+
"@babel/plugin-transform-runtime": "7.14.5",
34+
"@babel/preset-env": "7.14.5",
35+
"@babel/preset-react": "7.14.5",
36+
"@babel/preset-typescript": "7.14.5",
37+
"@babel/runtime": "7.14.5",
38+
"babel-plugin-macros": "3.1.0",
3839
"babel-plugin-transform-react-remove-prop-types": "0.4.24"
3940
}
4041
}

packages/react-dev-utils/README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -111,31 +111,6 @@ module.exports = {
111111
};
112112
```
113113

114-
#### `new WatchMissingNodeModulesPlugin(nodeModulesPath: string)`
115-
116-
This webpack plugin ensures `npm install <library>` forces a project rebuild.<br>
117-
We’re not sure why this isn't webpack's default behavior.<br>
118-
See [#186](https://github.com/facebook/create-react-app/issues/186) for details.
119-
120-
```js
121-
var path = require('path');
122-
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
123-
124-
// webpack config
125-
module.exports = {
126-
// ...
127-
plugins: [
128-
// ...
129-
// If you require a missing module and then `npm install` it, you still have
130-
// to restart the development server for webpack to discover it. This plugin
131-
// makes the discovery automatic so you don't have to restart.
132-
// See https://github.com/facebook/create-react-app/issues/186
133-
new WatchMissingNodeModulesPlugin(path.resolve('node_modules')),
134-
],
135-
// ...
136-
};
137-
```
138-
139114
#### `checkRequiredFiles(files: Array<string>): boolean`
140115

141116
Makes sure that all passed files exist.<br>

packages/react-dev-utils/WatchMissingNodeModulesPlugin.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/react-dev-utils/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"redirectServedPathMiddleware.js",
4848
"refreshOverlayInterop.js",
4949
"typescriptFormatter.js",
50-
"WatchMissingNodeModulesPlugin.js",
5150
"WebpackDevServerUtils.js",
5251
"webpackHotDevClient.js"
5352
],

packages/react-error-overlay/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"rimraf": "^3.0.2",
6767
"settle-promise": "1.0.0",
6868
"source-map": "0.5.7",
69-
"webpack": "^5.37.0"
69+
"webpack": "^5.41.1"
7070
},
7171
"jest": {
7272
"setupFiles": [

packages/react-scripts/config/pnpTs.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
2121
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
2222
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
2323
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
24-
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
2524
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
2625
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
2726
const ESLintPlugin = require('eslint-webpack-plugin');
@@ -663,12 +662,6 @@ module.exports = function (webpackEnv) {
663662
// a plugin that prints an error when you attempt to do this.
664663
// See https://github.com/facebook/create-react-app/issues/240
665664
isEnvDevelopment && new CaseSensitivePathsPlugin(),
666-
// If you require a missing module and then `npm install` it, you still have
667-
// to restart the development server for webpack to discover it. This plugin
668-
// makes the discovery automatic so you don't have to restart.
669-
// See https://github.com/facebook/create-react-app/issues/186
670-
isEnvDevelopment &&
671-
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
672665
isEnvProduction &&
673666
new MiniCssExtractPlugin({
674667
// Options similar to the same options in webpackOptions.output

packages/react-scripts/package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"types": "./lib/react-app.d.ts",
3030
"dependencies": {
3131
"@babel/core": "7.14.2",
32-
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-beta.8",
32+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.0",
3333
"@svgr/webpack": "5.5.0",
3434
"@typescript-eslint/eslint-plugin": "^4.5.0",
3535
"@typescript-eslint/parser": "^4.5.0",
@@ -42,8 +42,8 @@
4242
"browserslist": "^4.16.6",
4343
"camelcase": "^6.2.0",
4444
"case-sensitive-paths-webpack-plugin": "2.4.0",
45-
"css-loader": "5.2.4",
46-
"css-minimizer-webpack-plugin": "3.0.0",
45+
"css-loader": "5.2.6",
46+
"css-minimizer-webpack-plugin": "3.0.2",
4747
"dotenv": "9.0.2",
4848
"dotenv-expand": "5.1.0",
4949
"eslint": "^7.11.0",
@@ -55,19 +55,19 @@
5555
"eslint-plugin-react": "^7.21.5",
5656
"eslint-plugin-react-hooks": "^4.2.0",
5757
"eslint-plugin-testing-library": "^3.9.2",
58-
"eslint-webpack-plugin": "^2.5.2",
58+
"eslint-webpack-plugin": "^2.5.4",
5959
"file-loader": "^6.2.0",
6060
"fs-extra": "^10.0.0",
61-
"html-webpack-plugin": "5.3.1",
61+
"html-webpack-plugin": "5.3.2",
6262
"identity-obj-proxy": "3.0.0",
6363
"jest": "26.6.0",
6464
"jest-circus": "26.6.0",
6565
"jest-resolve": "26.6.0",
6666
"jest-watch-typeahead": "0.6.1",
67-
"mini-css-extract-plugin": "1.6.0",
68-
"postcss": "8.2.15",
67+
"mini-css-extract-plugin": "2.0.0",
68+
"postcss": "8.3.5",
6969
"postcss-flexbugs-fixes": "5.0.2",
70-
"postcss-loader": "5.3.0",
70+
"postcss-loader": "6.1.1",
7171
"postcss-normalize": "10.0.0",
7272
"postcss-preset-env": "6.7.0",
7373
"prompts": "2.4.1",
@@ -76,11 +76,10 @@
7676
"react-refresh": "^0.10.0",
7777
"resolve": "1.20.0",
7878
"resolve-url-loader": "^4.0.0",
79-
"sass-loader": "^11.1.1",
79+
"sass-loader": "^12.1.0",
8080
"semver": "7.3.5",
81-
"style-loader": "2.0.0",
82-
"ts-pnp": "1.2.0",
83-
"webpack": "5.37.0",
81+
"style-loader": "3.0.0",
82+
"webpack": "5.41.1",
8483
"webpack-dev-server": "4.0.0-beta.3",
8584
"webpack-manifest-plugin": "3.1.1",
8685
"workbox-webpack-plugin": "6.1.5"

0 commit comments

Comments
 (0)