diff --git a/packages/uni-app-vite/src/nvue/plugins/esbuild.ts b/packages/uni-app-vite/src/nvue/plugins/esbuild.ts index 34595b58716534f5f4df5f8d877c870825da7d4f..876461b1ed6592a4538b1a2135dfd3c1016c2890 100644 --- a/packages/uni-app-vite/src/nvue/plugins/esbuild.ts +++ b/packages/uni-app-vite/src/nvue/plugins/esbuild.ts @@ -66,14 +66,16 @@ ${polyfillCode}`, assets.push(name) } }) - - assets.forEach((name) => { - fs.copySync( - path.resolve(nvueOutputDir, name), - path.resolve(outputDir, name), - { overwrite: false } - ) - }) + // 仅 nvueOutputDir 时 copy + if (!appService) { + assets.forEach((name) => { + fs.copySync( + path.resolve(nvueOutputDir, name), + path.resolve(outputDir, name), + { overwrite: false } + ) + }) + } if (!entryPoints.length) { return