Skip to content

Commit

Permalink
Drop IE 11 support by default (facebook#5090)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Timer authored Sep 25, 2018
1 parent 337fb58 commit 062be50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 41 deletions.
30 changes: 0 additions & 30 deletions config/polyfills.js

This file was deleted.

3 changes: 0 additions & 3 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ module.exports = {
devtool: 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
entry: [
// We ship a few polyfills by default:
require.resolve('./polyfills'),
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
Expand Down
4 changes: 2 additions & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ module.exports = {
// We generate sourcemaps in production. This is slow but gives good results.
// You can exclude the *.map files from the build during deployment.
devtool: shouldUseSourceMap ? 'source-map' : false,
// In production, we only want to load the polyfills and the app code.
entry: [require.resolve('./polyfills'), paths.appIndexJs],
// In production, we only want to load the app code.
entry: [paths.appIndexJs],
output: {
// The build folder.
path: paths.appBuild,
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@
"jest": "23.6.0",
"loader-utils": "1.1.0",
"mini-css-extract-plugin": "0.4.3",
"object-assign": "4.1.1",
"optimize-css-assets-webpack-plugin": "5.0.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"promise": "8.0.2",
"raf": "3.4.0",
"react-app-polyfill": "^0.0.0",
"react-dev-utils": "^5.0.0",
"resolve": "1.8.1",
"sass-loader": "7.1.0",
Expand All @@ -68,8 +66,7 @@
"url-loader": "1.1.1",
"webpack": "4.19.1",
"webpack-dev-server": "3.1.9",
"webpack-manifest-plugin": "2.0.4",
"whatwg-fetch": "3.0.0"
"webpack-manifest-plugin": "2.0.4"
},
"devDependencies": {
"react": "^16.3.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
// in Jest configs. We need help from somebody with Windows to determine this.
const config = {
collectCoverageFrom: ['src/**/*.{js,jsx}'],
setupFiles: [resolve('config/polyfills.js')],
setupFiles: ['react-app-polyfill/jsdom'],
setupTestFrameworkScriptFile: setupTestsFile,
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx}',
Expand Down

0 comments on commit 062be50

Please sign in to comment.