1
0
mirror of synced 2026-03-22 18:48:34 +08:00

build: 构建playground失败

This commit is contained in:
roymondchen
2025-08-27 19:08:57 +08:00
parent 7695f005f6
commit a56bb562d8
10 changed files with 90 additions and 138 deletions

View File

@@ -1,27 +1,10 @@
import path from 'node:path';
import { defineConfig } from 'vite';
import fse from 'fs-extra';
import baseConfig from '../vite.config';
export default defineConfig({
...baseConfig,
plugins: [
...(baseConfig.plugins || []),
{
name: 'vite-plugin-copy-runtime',
apply: 'build',
enforce: 'post',
closeBundle() {
const clientFile = path.resolve(__dirname, '../dist/page')
fse.copySync(clientFile, path.resolve(__dirname, '../../../playground/public/runtime/react/page'))
},
}
],
root: './page',
publicDir: '../public',