Skip to content

Commit

Permalink
fix(index): 'No PostCSS Config found' (options.config) (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky authored May 9, 2017
1 parent 2192d46 commit e764761
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,17 @@ module.exports = function loader (css, map) {
const sourceMap = options.sourceMap

Promise.resolve().then(() => {
if (
Object.keys(options).length !== 0 ||
((rc || sourceMap) && Object.keys(options).length > 1) ||
((rc && sourceMap) && Object.keys(options).length > 2)
) {
const length = Object.keys(options).length

// TODO
// Deuglify
if (!options.config && !sourceMap && length) {
return parseOptions.call(this, options)
} else if (options.config && !sourceMap && length > 1) {
return parseOptions.call(this, options)
} else if (!options.config && sourceMap && length > 1) {
return parseOptions.call(this, options)
} else if (options.config && sourceMap && length > 2) {
return parseOptions.call(this, options)
}

Expand Down

0 comments on commit e764761

Please sign in to comment.