Replace cosmiconfig with lilconfig (#6038)
* Replace cosmiconfig with lilconfig It's already replaced in postcss-load-config See https://github.com/postcss/postcss-load-config/blob/main/package.json#L26 * Manually restore parse-json in lockfile removed by npm conflict resolver * Revert `postcss` version change Co-authored-by: Brad Cornes <hello@bradley.dev>
This commit is contained in:
parent
e302ef1a0d
commit
f31c4ee4cf
3 changed files with 60 additions and 70 deletions
|
|
@ -7,7 +7,7 @@ import path from 'path'
|
|||
import arg from 'arg'
|
||||
import fs from 'fs'
|
||||
import postcssrc from 'postcss-load-config'
|
||||
import { cosmiconfig } from 'cosmiconfig'
|
||||
import { lilconfig } from 'lilconfig'
|
||||
import loadPlugins from 'postcss-load-config/src/plugins' // Little bit scary, looking at private/internal API
|
||||
import tailwind from './processTailwindFeatures'
|
||||
import resolveConfigInternal from '../resolveConfig'
|
||||
|
|
@ -397,8 +397,8 @@ async function build() {
|
|||
? await (async () => {
|
||||
let file = path.resolve(customPostCssPath)
|
||||
|
||||
// Implementation, see: https://unpkg.com/browse/postcss-load-config@3.0.1/src/index.js
|
||||
let { config = {} } = await cosmiconfig('postcss').load(file)
|
||||
// Implementation, see: https://unpkg.com/browse/postcss-load-config@3.1.0/src/index.js
|
||||
let { config = {} } = await lilconfig('postcss').load(file)
|
||||
if (typeof config === 'function') {
|
||||
config = config()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue