Skip to content

Commit

Permalink
fix(index): do not emit sourceMap warning when explicitly set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 4, 2018
1 parent 2484275 commit 367f180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ module.exports = function loader (css, map, meta) {
css = this.exec(css, this.resource)
}

if (!sourceMap && map) {
if (!sourceMap && sourceMap !== false && map) {
this.emitWarning(`\n\n ⚠️ PostCSS Loader\n\nPrevious source map found, but options.sourceMap isn't set.\nIn this case the loader will discard the source map entirely for performance reasons.\nSee https://github.com/postcss/postcss-loader#sourcemap for more information.\n\n`)
}

Expand Down

0 comments on commit 367f180

Please sign in to comment.