diff --git a/vite.config.ts b/vite.config.ts index 7fb066d..c79b2ec 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,7 @@ import { include, exclude } from './build/optimize'; import { type UserConfigExport, type ConfigEnv, loadEnv } from 'vite'; import { root, alias, wrapperEnv, pathResolve, __APP_INFO__ } from './build/utils'; import copy from 'rollup-plugin-copy'; +import path from 'path'; export default ({ mode }: ConfigEnv): UserConfigExport => { const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } = wrapperEnv(loadEnv(mode, root)); @@ -41,8 +42,8 @@ export default ({ mode }: ConfigEnv): UserConfigExport => { copy({ targets: [ { - src: '/demoHtml/**/*', - dest: '/dist/demoHtml', + src: 'demoHtml/**/*', + dest: path.join(process.cwd(), 'dist', 'demoHtml'), }, ], overwrite: true,