Skip to content

Commit

Permalink
Don't use source maps when the option is explicitly set to false. [cl…
Browse files Browse the repository at this point in the history
…oses #756]
  • Loading branch information
jdalton committed Mar 18, 2019
1 parent c054905 commit 8558ba7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/module/internal/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,15 @@ function useAsync(entry) {
}

function useSourceMap(entry) {
if (DEVELOPMENT ||
ELECTRON_RENDERER ||
NDB ||
FLAGS.inspect ||
entry.package.options.sourceMap) {
return getSourceMappingURL(entry.compileData.code) === ""
}

return false
const { sourceMap } = entry.package.options

return sourceMap !== false &&
(sourceMap ||
DEVELOPMENT ||
ELECTRON_RENDERER ||
NDB ||
FLAGS.inspect) &&
getSourceMappingURL(entry.compileData.code) === ""
}

function jsonEvaluate(entry, parsed) {
Expand Down

0 comments on commit 8558ba7

Please sign in to comment.