forked from GaganAgarwal77/LensTok
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
32 lines (29 loc) · 863 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import babel from "vite-plugin-babel";
import { viteCommonjs, esbuildCommonjs } from '@originjs/vite-plugin-commonjs';
import GlobalPolyFill from "@esbuild-plugins/node-globals-polyfill";
export default defineConfig({
plugins: [react(), babel(), viteCommonjs(),],
optimizeDeps: {
esbuildOptions: {
define: {
global: "globalThis",
},
plugins: [
GlobalPolyFill({
process: true,
buffer: true,
}),
],
},
},
resolve: {
alias: {
process: "process/browser",
stream: "stream-browserify",
zlib: "browserify-zlib",
util: "util",
},
},
});