Skip to content

Commit

Permalink
Redisable require.ensure() (#3121)
Browse files Browse the repository at this point in the history
  • Loading branch information
everdimension authored and gaearon committed Jan 10, 2018
1 parent 9436818 commit bca89aa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
13 changes: 6 additions & 7 deletions packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,12 @@ module.exports = {
'valid-typeof': 'warn',
'no-restricted-properties': [
'error',
// TODO: reenable once import() is no longer slow.
// https://github.com/facebookincubator/create-react-app/issues/2176
// {
// object: 'require',
// property: 'ensure',
// message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting',
// },
{
object: 'require',
property: 'ensure',
message:
'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting',
},
{
object: 'System',
property: 'import',
Expand Down
5 changes: 2 additions & 3 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ module.exports = {
module: {
strictExportPresence: true,
rules: [
// TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } },
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },

// First, run the linter.
// It's important to do this before Babel processes the JS.
Expand Down
5 changes: 2 additions & 3 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ module.exports = {
module: {
strictExportPresence: true,
rules: [
// TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } },
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },

// First, run the linter.
// It's important to do this before Babel processes the JS.
Expand Down

0 comments on commit bca89aa

Please sign in to comment.