fix: fix loaderOptions.postcss detection (#3201)

fixes #3194
This commit is contained in:
金振祖
2019-01-08 11:50:05 +08:00
committed by Haoqun Jiang
parent f15dcf7f48
commit d5b5e3bfde
+1 -1
View File
@@ -46,7 +46,7 @@ module.exports = (api, options) => {
// check if the project has a valid postcss config
// if it doesn't, don't use postcss-loader for direct style imports
// because otherwise it would throw error when attempting to load postcss config
const hasPostCSSConfig = !!(api.service.pkg.postcss || findExisting(api.resolve('.'), [
const hasPostCSSConfig = !!(loaderOptions.postcss || api.service.pkg.postcss || findExisting(api.resolve('.'), [
'.postcssrc',
'.postcssrc.js',
'postcss.config.js',