Skip to content

Commit

Permalink
Throw a better error message when compiled SFC JS file does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Nov 14, 2021
1 parent f469712 commit 39d6719
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions EleventyVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 474,10 @@ class EleventyVue {

getFullJavaScriptComponentFilePath(localVuePath) {
let jsFilename = this.getJavaScriptComponentFile(localVuePath);
if(!jsFilename) {
throw new Error("Could not find compiled JavaScript file for Vue component: " localVuePath);
}

debugDev("Map vue path to JS component file: %o to %o", localVuePath, jsFilename);
let fullComponentPath = path.join(this.getFullCacheDir(), jsFilename);
return fullComponentPath;
Expand Down

0 comments on commit 39d6719

Please sign in to comment.