22 lines
457 B
TypeScript
22 lines
457 B
TypeScript
import { defineConfig } from "vite";
|
|||
|
|
import react from "@vitejs/plugin-react-swc";
|
||
|
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||
|
|
|
||
|
|
export default defineConfig(() => ({
|
||
|
|
plugins: [
|
||
|
|
nodePolyfills({
|
||
|
|
include: ["stream", "crypto", "process"],
|
||
|
|
globals: {
|
||
|
|
Buffer: true,
|
||
|
|
global: true,
|
||
|
|
process: true,
|
||
|
|
},
|
||
|
|
protocolImports: true,
|
||
|
|
}),
|
||
|
|
react(),
|
||
|
|
],
|
||
|
|
build: {
|
||
|
|
assetsDir: "_assets",
|
||
|
|
},
|
||
|
|
}));
|