Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(test-utils): detect project root using nuxt.config with .mjs
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
HigherOrderLogic and pi0 committed Nov 10, 2022
1 parent 8d30e97 commit 62bbb91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/test-utils/src/nuxt.ts
Expand Up @@ -10,6 +10,8 @@ const isNuxtApp = (dir: string) => {
return existsSync(dir) && (
existsSync(resolve(dir, 'pages')) ||
existsSync(resolve(dir, 'nuxt.config.js')) ||
existsSync(resolve(dir, 'nuxt.config.mjs')) ||
existsSync(resolve(dir, 'nuxt.config.cjs')) ||
existsSync(resolve(dir, 'nuxt.config.ts'))
)
}
Expand Down

0 comments on commit 62bbb91

Please sign in to comment.