bare-module-traverse 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +14 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -299,9 +299,20 @@ exports.imports = function* (
|
|
|
299
299
|
matchedConditions.pop()
|
|
300
300
|
|
|
301
301
|
if (resolutions === 0) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
switch (condition) {
|
|
303
|
+
case 'addon':
|
|
304
|
+
throw errors.ADDON_NOT_FOUND(
|
|
305
|
+
`Cannot find addon '${specifier}' imported from '${parentURL.href}'`
|
|
306
|
+
)
|
|
307
|
+
case 'asset':
|
|
308
|
+
throw errors.ASSET_NOT_FOUND(
|
|
309
|
+
`Cannot find asset '${specifier}' imported from '${parentURL.href}'`
|
|
310
|
+
)
|
|
311
|
+
default:
|
|
312
|
+
throw errors.MODULE_NOT_FOUND(
|
|
313
|
+
`Cannot find module '${specifier}' imported from '${parentURL.href}'`
|
|
314
|
+
)
|
|
315
|
+
}
|
|
305
316
|
}
|
|
306
317
|
}
|
|
307
318
|
|