mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(test-utils): detect project root using nuxt.config
with .mjs
and .cjs
extensions (#8855)
* fix(test-util): fix `.mjs` config file edge case * Update packages/test-utils/src/nuxt.ts Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
parent
8d30e97b91
commit
62bbb91446
@ -10,6 +10,8 @@ const isNuxtApp = (dir: string) => {
|
|||||||
return existsSync(dir) && (
|
return existsSync(dir) && (
|
||||||
existsSync(resolve(dir, 'pages')) ||
|
existsSync(resolve(dir, 'pages')) ||
|
||||||
existsSync(resolve(dir, 'nuxt.config.js')) ||
|
existsSync(resolve(dir, 'nuxt.config.js')) ||
|
||||||
|
existsSync(resolve(dir, 'nuxt.config.mjs')) ||
|
||||||
|
existsSync(resolve(dir, 'nuxt.config.cjs')) ||
|
||||||
existsSync(resolve(dir, 'nuxt.config.ts'))
|
existsSync(resolve(dir, 'nuxt.config.ts'))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user