-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
40 lines (37 loc) · 920 Bytes
/
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
39
40
import { defineConfig } from "vite";
import logseqPlugin from "vite-plugin-logseq";
import inject from "@rollup/plugin-inject";
import nodePolyfills from "rollup-plugin-node-polyfills";
export default defineConfig({
base: "./",
resolve: {
alias: {
stream: "rollup-plugin-node-polyfills/polyfills/stream",
crypto: "crypto-browserify",
},
},
build: {
target: "esnext",
// sourcemap: true,
// minify: false,
minify: "esbuild",
chunkSizeWarningLimit: 1024,
rollupOptions: {
plugins: [
nodePolyfills({ crypto: true }),
inject({
Buffer: ["buffer", "Buffer"],
stream: ["stream-browserify"],
crypto: ["crypto-browserify"],
}),
],
output: {
manualChunks: {
logseq: ["@logseq/libs"],
stegcloak: ["stegcloak"],
},
},
},
},
plugins: [logseqPlugin()],
});