-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
32 lines (29 loc) · 663 Bytes
/
vite.config.ts
File metadata and controls
32 lines (29 loc) · 663 Bytes
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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
plugins: [
sveltekit(),
viteStaticCopy({
targets: [
{
src: 'node_modules/onnxruntime-web/dist/*.jsep.*',
dest: 'wasm'
}
]
})
],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
APP_BUILD_HASH: JSON.stringify(process.env.APP_BUILD_HASH || 'dev-build')
},
build: {
sourcemap: true
},
worker: {
format: 'es'
},
esbuild: {
pure: process.env.ENV === 'dev' ? [] : ['console.log', 'console.debug', 'console.error']
}
});