-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
44 lines (42 loc) · 931 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
41
42
43
44
/**
* <reference types="vitest" />
* */
import { defineConfig } from 'vite'
import { resolve } from 'path'
import dts from 'vite-plugin-dts'
import wasm from 'vite-plugin-wasm'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
export default defineConfig({
// test: {
// globals: true,
// testTimeout: 30000,
// },
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
build: {
target: ['edge90', 'chrome90', 'firefox90', 'safari15'],
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'Metaid',
fileName: 'metaid',
formats: ['es', 'cjs', 'iife'],
},
minify: false,
},
plugins: [dts(), nodePolyfills(), wasm()],
optimizeDeps: {
include: ['buffer', 'process'],
esbuildOptions: {
target: 'esnext',
define: {
global: 'globalThis',
},
supported: {
bigint: true,
},
},
},
})