Skip to content

Commit 79935fb

Browse files
committed
Allow disabling sourcemaps from loader config
1 parent ee22bdc commit 79935fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = function(source) {
4545
// compile and generate sourcemaps
4646
const {code, map} = compile(
4747
source,
48-
Object.assign(opts, { sourcemap: this.sourceMap }),
48+
Object.assign(opts, { sourcemap: opts.sourcemap != null ? opts.sourcemap : this.sourceMap }),
4949
this.resourcePath
5050
)
5151

@@ -68,4 +68,4 @@ module.exports = function(source) {
6868
if (map) this.callback(null, output, map.toJSON())
6969

7070
return output
71-
}
71+
}

0 commit comments

Comments
 (0)