We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dd599e commit bd2220cCopy full SHA for bd2220c
packages/component/src/loadComponents.js
@@ -40,7 +40,12 @@ export default function loadComponents(loadableState) {
40
invariant(WEBPACK, '`loadComponents()` is only compatible with Webpack')
41
42
return Promise.all(
43
- loadableState.map(chunk => __webpack_require__.e(chunk)),
+ loadableState.map(chunk => __webpack_require__.e(chunk)).catch(error => {
44
+ // We can safely ignore "missing" type errors
45
+ // we just want the bundle to be loaded, not the module installed
46
+ if (error.message.match(/missing:/)) return
47
+ throw error
48
+ }),
49
).catch(error => {
50
warn('`loadComponents()` has failed')
51
warn(error)
0 commit comments