Skip to content

Commit e963d6c

Browse files
authored
fix: jsparser report webpack failure (#1797)
If there was an error during webpack build (like output being wrong) then jsparser was returning without error causing the next build step to fail without real explanation
1 parent 54185ff commit e963d6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-app/build-tools/jsparser/js_parser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ function traverseAndAnalyseFilesDir(inputDir, err) {
194194
}
195195

196196
function traverseFiles(filesToTraverse) {
197+
if (filesToTraverse.length === 0) {
198+
throw "no file was found in " + inputDir + ". Something must be wrong with the webpack build";
199+
}
197200
for (let i = 0; i < filesToTraverse.length; i += 1) {
198201
const fp = filesToTraverse[i];
199202
logger.info("Visiting JavaScript/ES Module file: " + fp);

0 commit comments

Comments
 (0)