Skip to content

Commit 062be50

Browse files
authored
Drop IE 11 support by default (facebook#5090)
* Drop ie 11 support and move polyfills to a new package * More useful directions for what entry point to use facebook#5090 (comment) * Clear up what file this polyfill goes in facebook#5090 (comment) * Polyfill `window`, not `global` * Remove proxy polyfill file
1 parent 337fb58 commit 062be50

File tree

5 files changed

+5
-41
lines changed

5 files changed

+5
-41
lines changed

config/polyfills.js

-30
This file was deleted.

config/webpack.config.dev.js

-3
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ module.exports = {
8282
devtool: 'cheap-module-source-map',
8383
// These are the "entry points" to our application.
8484
// This means they will be the "root" imports that are included in JS bundle.
85-
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
8685
entry: [
87-
// We ship a few polyfills by default:
88-
require.resolve('./polyfills'),
8986
// Include an alternative client for WebpackDevServer. A client's job is to
9087
// connect to WebpackDevServer by a socket and get notified about changes.
9188
// When you save a file, the client will either apply hot updates (in case

config/webpack.config.prod.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ module.exports = {
100100
// We generate sourcemaps in production. This is slow but gives good results.
101101
// You can exclude the *.map files from the build during deployment.
102102
devtool: shouldUseSourceMap ? 'source-map' : false,
103-
// In production, we only want to load the polyfills and the app code.
104-
entry: [require.resolve('./polyfills'), paths.appIndexJs],
103+
// In production, we only want to load the app code.
104+
entry: [paths.appIndexJs],
105105
output: {
106106
// The build folder.
107107
path: paths.appBuild,

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,12 @@
5050
"jest": "23.6.0",
5151
"loader-utils": "1.1.0",
5252
"mini-css-extract-plugin": "0.4.3",
53-
"object-assign": "4.1.1",
5453
"optimize-css-assets-webpack-plugin": "5.0.1",
5554
"postcss-flexbugs-fixes": "4.1.0",
5655
"postcss-loader": "3.0.0",
5756
"postcss-preset-env": "6.0.6",
5857
"postcss-safe-parser": "4.0.1",
59-
"promise": "8.0.2",
60-
"raf": "3.4.0",
58+
"react-app-polyfill": "^0.0.0",
6159
"react-dev-utils": "^5.0.0",
6260
"resolve": "1.8.1",
6361
"sass-loader": "7.1.0",
@@ -68,8 +66,7 @@
6866
"url-loader": "1.1.1",
6967
"webpack": "4.19.1",
7068
"webpack-dev-server": "3.1.9",
71-
"webpack-manifest-plugin": "2.0.4",
72-
"whatwg-fetch": "3.0.0"
69+
"webpack-manifest-plugin": "2.0.4"
7370
},
7471
"devDependencies": {
7572
"react": "^16.3.2",

scripts/utils/createJestConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
2222
// in Jest configs. We need help from somebody with Windows to determine this.
2323
const config = {
2424
collectCoverageFrom: ['src/**/*.{js,jsx}'],
25-
setupFiles: [resolve('config/polyfills.js')],
25+
setupFiles: ['react-app-polyfill/jsdom'],
2626
setupTestFrameworkScriptFile: setupTestsFile,
2727
testMatch: [
2828
'<rootDir>/src/**/__tests__/**/*.{js,jsx}',

0 commit comments

Comments
 (0)