Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack-contrib/postcss-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.2
Choose a base ref
...
head repository: webpack-contrib/postcss-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on May 9, 2017

  1. fix(index): don't fail on 'sourceMap: false' && emit a warning instea…

    …d, when previous map found (`options.sourceMap`)
    michael-ciniawsky committed May 9, 2017
    2
    Copy the full SHA
    159b66a View commit details
  2. Copy the full SHA
    6388f0b View commit details
Showing with 17 additions and 3 deletions.
  1. +10 −0 CHANGELOG.md
  2. +6 −2 lib/index.js
  3. +1 −1 package.json
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<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>
## [2.0.2](https://github.com/postcss/postcss-loader/compare/v2.0.1...v2.0.2) (2017-05-09)

8 changes: 6 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -127,8 +127,12 @@ module.exports = function loader (css, map) {
css = this.exec(css, this.resource)
}

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)
.process(css, options)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-loader",
"version": "2.0.2",
"version": "2.0.3",
"description": "PostCSS loader for webpack",
"main": "lib/index.js",
"engines": {