Skip to content

Commit 4416791

Browse files
yyx990803michael-ciniawsky
authored andcommittedMay 4, 2018
fix(index): remove sourceMap warning (#361)
1 parent 2484275 commit 4416791

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed
 

‎README.md

-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ module.exports = ({ file, options, env }) => ({
268268

269269
Enables source map support, `postcss-loader` will use the previous source map given by other loaders and update it accordingly, if no previous loader is applied before `postcss-loader`, the loader will generate a source map for you.
270270

271-
> :warning: If a previous loader like e.g `sass-loader` is applied and it's `sourceMap` option is set, but the `sourceMap` option in `postcss-loader` is omitted, previous source maps will be discarded by `postcss-loader` **entirely**.
272-
273271
**webpack.config.js**
274272
```js
275273
{

‎lib/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ module.exports = function loader (css, map, meta) {
137137
css = this.exec(css, this.resource)
138138
}
139139

140-
if (!sourceMap && map) {
141-
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`)
142-
}
143-
144140
if (sourceMap && typeof map === 'string') map = JSON.parse(map)
145141
if (sourceMap && map) options.map.prev = map
146142

0 commit comments

Comments
 (0)
Please sign in to comment.