mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Better error for 'No such asset'
This commit is contained in:
parent
070c5f85da
commit
7895964ee1
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ export function resolveModule(
|
|||
// Assets are compiled into the runtime javascript bundle.
|
||||
const moduleId = moduleSpecifier.split("/").pop();
|
||||
const assetName = moduleId.includes(".") ? moduleId : `${moduleId}.d.ts`;
|
||||
util.assert(assetName in assetSourceCode);
|
||||
util.assert(assetName in assetSourceCode, `No such asset "${assetName}"`);
|
||||
sourceCode = assetSourceCode[assetName];
|
||||
filename = ASSETS + assetName;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue