diff options
Diffstat (limited to 'src/bun.js/builtins/js/BundlerPlugin.js')
-rw-r--r-- | src/bun.js/builtins/js/BundlerPlugin.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bun.js/builtins/js/BundlerPlugin.js b/src/bun.js/builtins/js/BundlerPlugin.js index 8e587794b..f580a1c05 100644 --- a/src/bun.js/builtins/js/BundlerPlugin.js +++ b/src/bun.js/builtins/js/BundlerPlugin.js @@ -53,7 +53,8 @@ function runOnResolvePlugins( ][kindId]; var promiseResult = (async (inputPath, inputNamespace, importer, kind) => { - var results = this.onResolve.@get(inputNamespace); + var {onResolve, onLoad} = this; + var results = onResolve.@get(inputNamespace); if (!results) { this.onResolveAsync(internalID, null, null, null); return null; @@ -131,7 +132,7 @@ function runOnResolvePlugins( if (userNamespace === "dataurl") { if (!path.startsWith("data:")) { @throwTypeError( - 'onResolve plugin "path" must start with "data:" when the namespace is"dataurl"' + 'onResolve plugin "path" must start with "data:" when the namespace is "dataurl"' ); } } @@ -399,7 +400,7 @@ function runOnLoadPlugins(internalID, path, namespace, defaultLoaderId) { const chosenLoader = LOADERS_MAP[loader]; if (chosenLoader === @undefined) { - @throwTypeError('Loader "' + loader + '" is not supported.'); + @throwTypeError(`Loader ${@jsonStringify(loader, " ")} is not supported.`); } this.onLoadAsync(internalID, contents, chosenLoader); |