Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Mark cache dirty for ESM syntax errors in module/_compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Apr 13, 2018
1 parent be3c901 commit 7d74d00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/module/_compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ function tryCompileCached(caller, entry, content, filename) {
throw e
}

if (isESM &&
e.name === "SyntaxError") {
entry.package.cache.dirty = true
}

content = () => readSourceCode(filename)
throw maskStackTrace(e, content, filename, isESM)
} finally {
Expand Down

0 comments on commit 7d74d00

Please sign in to comment.