bare-module 4.3.1 → 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 +3 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -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
|
|