Skip to content

Commit

Permalink
Merge pull request wattanx#19 from Shimpei-GANGAN/fix/18-config-path-…
Browse files Browse the repository at this point in the history
…not-reflected

fix: settings are not reflected when settings configPath options.
  • Loading branch information
wattanx authored Oct 13, 2023
2 parents 1830f51 + b889507 commit 8c82593
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import { resolveCSSPath } from "./resolvers";
const logger = useLogger("nuxt:pandacss");

export interface ModuleOptions extends Config {
/**
* The path of the Panda config file.
* If the file does not exist, it will be created automatically.
* @default '<buildDir>/panda.config.mjs'
* @example 'panda.config.ts'
*/
configPath?: string;
/**
* The path of the Panda CSS file.
Expand Down Expand Up @@ -56,7 +62,7 @@ export default defineNuxtModule<ModuleOptions>({

let configPath = "";
try {
const configFile = findConfigFile({ cwd });
const configFile = findConfigFile({ cwd, file: options.configPath });

configPath = configFile ?? addPandaConfigTemplate(cwd, options);
} catch (e) {
Expand Down

0 comments on commit 8c82593

Please sign in to comment.