Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5c81891

Browse files
everdimensionTimer
authored andcommittedJan 14, 2018
Redisable require.ensure() (#3121)
1 parent addaeb1 commit 5c81891

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed
 

‎packages/eslint-config-react-app/index.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,12 @@ module.exports = {
225225
'valid-typeof': 'warn',
226226
'no-restricted-properties': [
227227
'error',
228-
// TODO: reenable once import() is no longer slow.
229-
// https://github.com/facebookincubator/create-react-app/issues/2176
230-
// {
231-
// object: 'require',
232-
// property: 'ensure',
233-
// message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting',
234-
// },
228+
{
229+
object: 'require',
230+
property: 'ensure',
231+
message:
232+
'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting',
233+
},
235234
{
236235
object: 'System',
237236
property: 'import',

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,8 @@ module.exports = {
117117
module: {
118118
strictExportPresence: true,
119119
rules: [
120-
// TODO: Disable require.ensure as it's not a standard language feature.
121-
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
122-
// { parser: { requireEnsure: false } },
120+
// Disable require.ensure as it's not a standard language feature.
121+
{ parser: { requireEnsure: false } },
123122

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

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ module.exports = {
124124
module: {
125125
strictExportPresence: true,
126126
rules: [
127-
// TODO: Disable require.ensure as it's not a standard language feature.
128-
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
129-
// { parser: { requireEnsure: false } },
127+
// Disable require.ensure as it's not a standard language feature.
128+
{ parser: { requireEnsure: false } },
130129

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

0 commit comments

Comments
 (0)
Please sign in to comment.