抽取 randomUUID, crypto-browserify

This commit is contained in:
CrescentLeaf
2025-12-06 11:08:24 +08:00
parent d76abcf512
commit d433ceb4a9
7 changed files with 68 additions and 17 deletions

View File

@@ -1,12 +1,23 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import config from '../server/config.ts'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react(),
nodePolyfills({
include: ['crypto', 'stream', 'vm'],
globals: {
Buffer: true,
global: true,
process: true,
},
})
],
build: {
sourcemap: true,
outDir: "." + config.data_path + '/page_compiled',
}
},
})