Skip to content

Commit

Permalink
feat: allow disabling auto postcss config loading via postcss.useConf…
Browse files Browse the repository at this point in the history
…igFile

close #654, close #800
  • Loading branch information
yyx990803 committed Dec 15, 2017
1 parent 4e7b0b9 commit e27a5ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/style-compiler/load-postcss-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ function isObject (val) {
}

module.exports = function loadPostcssConfig (loaderContext, inlineConfig = {}) {
if (inlineConfig.useConfigFile === false) {
return Promise.resolve({
plugins: inlineConfig.plugins || [],
options: inlineConfig.options || {}
})
}

if (process.env.VUE_LOADER_TEST || !loaded) {
const config = inlineConfig.config || {}
const ctx = { webpack: loaderContext }
Expand Down

0 comments on commit e27a5ce

Please sign in to comment.