Skip to content

Commit

Permalink
fix: Ensure the root option provided by the user has higher priority (c…
Browse files Browse the repository at this point in the history
…lose #214) (#217)
  • Loading branch information
ElMassimo committed Jul 27, 2021
1 parent 4290529 commit cb0768f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/plugin-utils/src/resolveOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ export async function resolveOptions(

const debugOptions = _debug(`${name}:options`)

const root = options.root || utilsOptions.root || process.cwd()

// eslint-disable-next-line prefer-const
let { config, filepath: configFilePath } = loadConfigFile
? loadConfiguration({
onConfigurationError: error => console.error(error),
...utilsOptions,
root: utilsOptions.root || options.root,
root,
config: options.config,
configFiles: options.configFiles,
})
Expand All @@ -64,7 +66,6 @@ export async function resolveOptions(
config = modifiedConfigs

const {
root = utilsOptions.root || process.cwd(),
scan = true,
preflight = true,
transformCSS = true,
Expand Down

0 comments on commit cb0768f

Please sign in to comment.