chore: 删除ui/ui-react
This commit is contained in:
36
runtime/react/page/vite.config.ts
Normal file
36
runtime/react/page/vite.config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
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',
|
||||
|
||||
base: `${baseConfig.base}/page`,
|
||||
|
||||
build: {
|
||||
emptyOutDir: false,
|
||||
sourcemap: true,
|
||||
outDir: '../dist/page',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user