diff --git a/packages/uni-cli-shared/src/utils.ts b/packages/uni-cli-shared/src/utils.ts index c19b0fa49108829557eaeb12abaae90e3d1742b9..6ff76d7d517da893b2b886bb2b39c10605df4b88 100644 --- a/packages/uni-cli-shared/src/utils.ts +++ b/packages/uni-cli-shared/src/utils.ts @@ -193,9 +193,11 @@ export function isAppVue(filename: string) { } export function resolveAppVue(inputDir: string) { - const appUVue = path.resolve(inputDir, 'App.uvue') - if (fs.existsSync(appUVue)) { - return normalizePath(appUVue) + if (process.env.UNI_APP_X === 'true') { + const appUVue = path.resolve(inputDir, 'App.uvue') + if (fs.existsSync(appUVue)) { + return normalizePath(appUVue) + } } return normalizePath(path.resolve(inputDir, 'App.vue')) }