23 lines
528 B
TypeScript
23 lines
528 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const filesNeedToExclude = ["public/StreamingAssets/.*","public/StreamingAssets/.*"];
|
|
|
|
const filesPathToExclude = filesNeedToExclude.map((src) => {
|
|
return fileURLToPath(new URL(src, import.meta.url));
|
|
});
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
outDir:'build',
|
|
rollupOptions: {
|
|
external: [...filesPathToExclude],
|
|
},
|
|
},
|
|
|
|
plugins: [react()],
|
|
})
|