build: 构建playground失败
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user