postcss-loader
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.0.3"></a> | ||
## [2.0.3](https://github.com/postcss/postcss-loader/compare/v2.0.2...v2.0.3) (2017-05-09) | ||
### Bug Fixes | ||
* **index:** don't fail on 'sourceMap: false' && emit a warning instead, when previous map found (`options.sourceMap`) ([159b66a](https://github.com/postcss/postcss-loader/commit/159b66a)) | ||
<a name="2.0.2"></a> | ||
@@ -7,0 +17,0 @@ ## [2.0.2](https://github.com/postcss/postcss-loader/compare/v2.0.1...v2.0.2) (2017-05-09) |
@@ -130,5 +130,9 @@ 'use strict' | ||
if (typeof map === 'string') map = JSON.parse(map) | ||
if (map && map.mappings) options.map.prev = map | ||
if (!sourceMap && map) { | ||
this.emitWarning(`\n\n ⚠️ PostCSS Loader\n\nPrevious source map found, but options.sourceMap isn't set, this way the loader will discard the source map enterily for performance reasons, see https://github.com/postcss/postcss-loader#sourcemap for more info on the subject\n\n`) | ||
} | ||
if (sourceMap && typeof map === 'string') map = JSON.parse(map) | ||
if (sourceMap && map) options.map.prev = map | ||
return postcss(plugins) | ||
@@ -135,0 +139,0 @@ .process(css, options) |
{ | ||
"name": "postcss-loader", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "PostCSS loader for webpack", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
23702
220