mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-07 06:17:41 -04:00
6 lines
466 B
TypeScript
6 lines
466 B
TypeScript
// Nitro is designed to be independent of the filesystem, but that requires migration in some express routes
|
|
// in dev mode, import.meta.url references `.nuxt/dev/index.mjs` and not the file path of this file
|
|
// in production mode, import.meta.url is not a directory, so by convention the working directory must be the repo root,
|
|
// however, `nuxt preview` automatically changes into .output
|
|
export const rootDir = process.cwd().replace(/\/\.output(?:-\w+)?$/, '');
|