-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
52 lines (51 loc) · 1.05 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
46
47
48
49
50
51
52
import { defineConfig } from 'vite';
import path from 'path';
import dts from 'vite-plugin-dts';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
plugins: [
viteStaticCopy({
targets: [
{
src: 'node_modules/onnxruntime-web/dist/*.wasm',
dest: 'node_modules/.vite/deps'
}
]
}),
dts({
insertTypesEntry: true,
include: ['./src/'],
entryRoot: './src'
})
],
publicDir: 'models',
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
server: {
open: '/test/index.html'
},
build: {
sourcemap: true,
lib: {
entry: {
'index': './src/index.ts',
'openseadragon/index': './src/openseadragon/index.ts'
},
formats: ['es']
},
rollupOptions: {
output: {
assetFileNames: 'annotorious-plugin-sam.[ext]',
globals: {
fs: 'fs',
path: 'path',
crypto: 'crypto'
}
},
external: ['fs', 'path', 'crypto']
}
}
});