Skip to content

Commit

Permalink
fix: clarify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gtm-nayan committed Jul 10, 2023
1 parent 41e7955 commit ecd34cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-avocados-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/repl': patch
---

fix: clarify error message
4 changes: 2 additions & 2 deletions packages/repl/src/lib/workers/bundler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async function get_bundle(uid, mode, cache, local_files_lookup) {
if (importer && local_files_lookup.has(importer)) {
// relative import in a REPL file
// should've matched above otherwise importee doesn't exist
console.error(`Cannot find file "${importee}" imported by "${importer}" in the REPL`);
throw new Error(`Cannot find file "${importee}" imported by "${importer}" in the REPL`);
return;
} else {
// relative import in an external file
Expand Down Expand Up @@ -516,4 +516,4 @@ async function bundle({ uid, files }) {
})
};
}
}
}

0 comments on commit ecd34cb

Please sign in to comment.