postcss-loader
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.0.4"></a> | ||
## [2.0.4](https://github.com/postcss/postcss-loader/compare/v2.0.3...v2.0.4) (2017-05-10) | ||
### Bug Fixes | ||
* **index:** `postcss.config.js` not resolved correctly (`options.config`) ([faaeee4](https://github.com/postcss/postcss-loader/commit/faaeee4)) | ||
* **index:** update validation schema, better warning message ([4f20c99](https://github.com/postcss/postcss-loader/commit/4f20c99)) | ||
<a name="2.0.3"></a> | ||
@@ -7,0 +18,0 @@ ## [2.0.3](https://github.com/postcss/postcss-loader/compare/v2.0.2...v2.0.3) (2017-05-09) |
@@ -8,3 +8,3 @@ 'use strict' | ||
const parseOptions = require('./options') | ||
const validateOptions = require('schema-utils') // eslint-disable-line | ||
const validateOptions = require('schema-utils') | ||
@@ -49,7 +49,6 @@ const postcss = require('postcss') | ||
// TODO | ||
// validateOptions('./node_modules/postcss-loader/lib/options.json', options, 'PostCSS Loader') | ||
validateOptions(require('./options.json'), options, 'PostCSS Loader') | ||
const rc = { | ||
path: '', | ||
path: path.dirname(file), | ||
ctx: { | ||
@@ -60,3 +59,4 @@ file: { | ||
basename: path.basename(file) | ||
} | ||
}, | ||
options: {} | ||
} | ||
@@ -66,9 +66,9 @@ } | ||
if (options.config) { | ||
options.config.path | ||
? rc.path = path.resolve(options.config.path) | ||
: rc.path = path.dirname(file) | ||
if (options.config.path) { | ||
rc.path = path.resolve(options.config.path) | ||
} | ||
options.config.ctx | ||
? rc.ctx.options = options.config.ctx | ||
: rc.ctx.options = {} | ||
if (options.config.ctx) { | ||
rc.ctx.options = options.config.ctx | ||
} | ||
} | ||
@@ -82,3 +82,3 @@ | ||
// TODO | ||
// Deuglify | ||
// Refactor | ||
if (!options.config && !sourceMap && length) { | ||
@@ -136,3 +136,3 @@ return parseOptions.call(this, options) | ||
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`) | ||
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 enterily for performance reasons.\nSee https://github.com/postcss/postcss-loader#sourcemap for more information.\n\n`) | ||
} | ||
@@ -139,0 +139,0 @@ |
@@ -16,2 +16,5 @@ { | ||
}, | ||
"exec": { | ||
"type": "boolean" | ||
}, | ||
"parser": { | ||
@@ -28,8 +31,2 @@ "type": "string" | ||
"type": [ "string", "boolean" ] | ||
}, | ||
"exec": { | ||
"type": "boolean" | ||
}, | ||
"rewrite": { | ||
"type": "boolean" | ||
} | ||
@@ -36,0 +33,0 @@ }, |
{ | ||
"name": "postcss-loader", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "PostCSS loader for webpack", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -103,3 +103,3 @@ [![npm][npm]][npm-url] | ||
'style-loader', | ||
{ loader: 'css-loader' options: { importLoaders: 1 } }, | ||
{ loader: 'css-loader', options: { importLoaders: 1 } }, | ||
'postcss-loader' | ||
@@ -290,3 +290,3 @@ ] | ||
{ | ||
loader: 'postcss-loader' | ||
loader: 'postcss-loader', | ||
options: { | ||
@@ -293,0 +293,0 @@ sourceMap: 'inline' |
23997
217