Skip to content

Commit c622868

Browse files
authored
fix: respect inputSourceMap loader option (#896)
Currently, when the loader is invoked without a `map` object the `inputSourceMap` fallbacks to `undefined`. This caused the sourcemap to be loaded by Babel since this defaults to `true` https://babeljs.io/docs/en/options#inputsourcemap Thus, currently there is no way to disable `inputSourceMap` when using this loader.
1 parent f7982c1 commit c622868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async function loader(source, inputSourceMap, overrides) {
130130

131131
const programmaticOptions = Object.assign({}, loaderOptions, {
132132
filename,
133-
inputSourceMap: inputSourceMap || undefined,
133+
inputSourceMap: inputSourceMap || loaderOptions.inputSourceMap,
134134

135135
// Set the default sourcemap behavior based on Webpack's mapping flag,
136136
// but allow users to override if they want.

0 commit comments

Comments
 (0)