mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 00:21:05 -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.
|
// Assets are compiled into the runtime javascript bundle.
|
||||||
const moduleId = moduleSpecifier.split("/").pop();
|
const moduleId = moduleSpecifier.split("/").pop();
|
||||||
const assetName = moduleId.includes(".") ? moduleId : `${moduleId}.d.ts`;
|
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];
|
sourceCode = assetSourceCode[assetName];
|
||||||
filename = ASSETS + assetName;
|
filename = ASSETS + assetName;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue