-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
43 lines (42 loc) · 1.14 KB
/
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
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { watchExtensions } from './vite/watchExtensions'
import pkg from './package.json' assert { type: 'json' }
import dts from 'vite-plugin-dts'
export default defineConfig({
build: {
lib: {
entry: [
resolve(__dirname, 'lib/ShaclForm.ts'),
],
formats: ['es'],
name: 'ShaclForm',
fileName: 'ShaclForm',
},
rollupOptions: {
external: [
...Object.keys(pkg.dependencies), // don't bundle dependencies
/^node:.*/, // don't bundle built-in Node.js modules (use protocol imports!)
],
},
target: 'esnext',
},
server: {
port: 8007
},
plugins: [
watchExtensions(['ttl']),
dts()
],
esbuild: {
minifyIdentifiers: false,
keepNames: true,
},
define: {
'import.meta.env.POSITIONSTACK': JSON.stringify(process.env.POSITIONSTACK),
'import.meta.env.S3DOMAIN': JSON.stringify(process.env.S3DOMAIN),
'import.meta.env.COMPANION': JSON.stringify(process.env.COMPANION),
'import.meta.env.STORAGE_BACKEND': JSON.stringify(process.env.STORAGE_BACKEND),
'__dirname': '"/"',
}
})