GeezerVison is showing github.com — break up import keyword to avoid being accidentally parsed as dynamic… · react/react@b8884de
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react/src/ReactLazy.js +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -88,7 +88,8 @@ function lazyInitializer<T>(payload: Payload<T>): T { |
88 | 88 | if (__DEV__) { |
89 | 89 | if (moduleObject === undefined) { |
90 | 90 | console.error( |
91 | | - 'lazy: Expected the result of a dynamic import() call. ' + |
| 91 | + 'lazy: Expected the result of a dynamic imp' + |
| 92 | + 'ort() call. ' + |
92 | 93 | 'Instead received: %s\n\nYour code should look like: \n ' + |
93 | 94 | // Break up imports to avoid accidentally parsing them as dependencies. |
94 | 95 | 'const MyComponent = lazy(() => imp' + |
@@ -101,7 +102,8 @@ function lazyInitializer<T>(payload: Payload<T>): T { |
101 | 102 | if (__DEV__) { |
102 | 103 | if (!('default' in moduleObject)) { |
103 | 104 | console.error( |
104 | | - 'lazy: Expected the result of a dynamic import() call. ' + |
| 105 | + 'lazy: Expected the result of a dynamic imp' + |
| 106 | + 'ort() call. ' + |
105 | 107 | 'Instead received: %s\n\nYour code should look like: \n ' + |
106 | 108 | // Break up imports to avoid accidentally parsing them as dependencies. |
107 | 109 | 'const MyComponent = lazy(() => imp' + |
|