repl: better bundling error when unable to resolve module (#2208)

pull/7738/head
Conduitry 7 years ago
parent 1808331703
commit 2511745ca1

@ -89,6 +89,8 @@ async function getBundle(mode, cache, lookup) {
if (importee.endsWith('.html')) importee = importee.replace(/\.html$/, '.svelte'); if (importee.endsWith('.html')) importee = importee.replace(/\.html$/, '.svelte');
if (importee in lookup) return importee; if (importee in lookup) return importee;
throw new Error(`Could not resolve "${importee}" from "${importer}"`);
}, },
load(id) { load(id) {
if (id.startsWith(`https://`)) return fetch_if_uncached(id); if (id.startsWith(`https://`)) return fetch_if_uncached(id);

Loading…
Cancel
Save