bare-module 4.3.0 → 4.3.2
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 +4 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -510,7 +510,7 @@ const Module = module.exports = exports = class Module {
|
|
|
510
510
|
} = opts
|
|
511
511
|
|
|
512
512
|
const [resolution = null] = resolve(specifier, parentURL, {
|
|
513
|
-
conditions,
|
|
513
|
+
conditions: ['asset', ...conditions],
|
|
514
514
|
imports,
|
|
515
515
|
resolutions
|
|
516
516
|
}, readPackage)
|
|
@@ -767,22 +767,16 @@ Module._extensions['.bundle'] = function (module, source, referrer) {
|
|
|
767
767
|
module._resolutions = bundle.resolutions
|
|
768
768
|
|
|
769
769
|
module._protocol = protocol.extend({
|
|
770
|
-
preresolve (context, specifier) {
|
|
771
|
-
return specifier
|
|
772
|
-
},
|
|
773
|
-
|
|
774
770
|
postresolve (context, url) {
|
|
775
|
-
return url
|
|
771
|
+
return bundle.exists(url.href) ? url : context.postresolve(url)
|
|
776
772
|
},
|
|
777
773
|
|
|
778
|
-
* resolve () {},
|
|
779
|
-
|
|
780
774
|
exists (context, url) {
|
|
781
|
-
return bundle.exists(url.href)
|
|
775
|
+
return bundle.exists(url.href) || context.exists(url)
|
|
782
776
|
},
|
|
783
777
|
|
|
784
778
|
read (context, url) {
|
|
785
|
-
return bundle.read(url.href)
|
|
779
|
+
return bundle.read(url.href) || context.read(url)
|
|
786
780
|
}
|
|
787
781
|
})
|
|
788
782
|
|