bare-module 1.14.4 → 1.14.5
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 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -238,7 +238,7 @@ module.exports = exports = class Module {
|
|
|
238
238
|
|
|
239
239
|
if (this._cache[specifier]) return this._transform(this._cache[specifier], referrer, dynamic)
|
|
240
240
|
|
|
241
|
-
const bundle = this._bundleFor(path.dirname(specifier), protocol
|
|
241
|
+
const bundle = this._bundleFor(path.dirname(specifier), protocol)
|
|
242
242
|
|
|
243
243
|
if (bundle) {
|
|
244
244
|
protocol = new Protocol({
|
|
@@ -699,6 +699,8 @@ exports._extensions['.node'] = function (module, source, referrer, protocol, imp
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
exports._extensions['.bundle'] = function (module, source, referrer, protocol, imports) {
|
|
702
|
+
if (source === null) source = protocol.read(module._filename)
|
|
703
|
+
|
|
702
704
|
if (typeof source === 'string') source = Buffer.from(source)
|
|
703
705
|
|
|
704
706
|
const bundle = this._bundleFor(module._filename, protocol, source)
|
|
@@ -711,7 +713,7 @@ exports._extensions['.bundle'] = function (module, source, referrer, protocol, i
|
|
|
711
713
|
|
|
712
714
|
exports._protocols['file:'] = new Protocol({
|
|
713
715
|
preresolve (specifier) {
|
|
714
|
-
return
|
|
716
|
+
return specifier.replace(/^file:/, '')
|
|
715
717
|
},
|
|
716
718
|
|
|
717
719
|
postresolve (specifier) {
|