-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
37 lines (35 loc) · 964 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
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import { externalizeDeps } from 'vite-plugin-externalize-deps'
const root = dirname(fileURLToPath(import.meta.url))
export default defineConfig({
build: {
lib: {
entry: 'src/index.ts',
fileName: 'index',
formats: ['cjs', 'es'],
},
sourcemap: true,
},
plugins: [
externalizeDeps({
include: [
/^vellma(?:\/.*)?/,
],
}),
],
resolve: {
alias: {
'#data': join(root, './src/data'),
'#test/utils': join(root, './test/utils'),
'vellma/agents': join(root, './agents/index.ts'),
'vellma/integrations': join(root, './integrations/src'),
'vellma/models': join(root, './models/src'),
'vellma/peripherals': join(root, './peripherals/src'),
'vellma/tools': join(root, './tools/src'),
'vellma': join(root, './src'),
},
},
root,
})