-
Notifications
You must be signed in to change notification settings - Fork 71
/
vite.config.js
45 lines (37 loc) · 1.03 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill";
import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill";
import pkg from "./package.json";
import path from "path";
const heliusKey = process.env.HELIUS_API_KEY;
export default defineConfig(({ mode }) => ({
build: {
target: "es2020",
},
define: {
APP_NAME: JSON.stringify(pkg.name),
APP_VERSION: JSON.stringify(pkg.version),
// ...nodeBandAid,
"process.env.NODE_DEBUG": false,
},
optimizeDeps: {
esbuildOptions: {
target: "es2020",
},
},
plugins: [
sveltekit(),
NodeModulesPolyfillPlugin(),
NodeGlobalsPolyfillPlugin({
buffer: true,
define: {},
process: true,
}),
],
resolve: {
alias: {
$lib: path.resolve("./src/lib"), // Add this line
},
},
}));