-
Notifications
You must be signed in to change notification settings - Fork 16
/
vite.config.ts
38 lines (37 loc) · 1.03 KB
/
vite.config.ts
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
33
34
35
36
37
38
/// <reference types="vitest" />
// https://vitejs.dev/config/
import { defineConfig } from "vite";
import path from "node:path";
import react from "@vitejs/plugin-react";
import { visualizer } from "rollup-plugin-visualizer";
// import million from "million/compiler";
export default defineConfig({
plugins: [
// million.vite({ auto: true }),
react(),
visualizer(),
],
test: {},
build: {
sourcemap: true,
rollupOptions: {
external: ["perf_hooks"],
output: {
manualChunks: {
"ts-morph": ["ts-morph"],
elkjs: ["elkjs"],
"dom-to-svg": ["dom-to-svg"],
},
},
},
},
resolve: {
alias: {
process: "process/browser",
path: path.resolve("./node_modules/@jspm/core/nodelibs/browser/path.js"),
url: path.resolve("./node_modules/@jspm/core/nodelibs/browser/url.js"),
fs: path.resolve("./node_modules/@jspm/core/nodelibs/browser/fs.js"),
"source-map-js": path.resolve("./node_modules/source-map-js/source-map.js"),
},
},
});