-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
27 lines (26 loc) · 954 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
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import dts from 'vite-plugin-dts'
import path from 'path'
export default defineConfig({
build: {
sourcemap: true,
lib: {
entry: {
index: path.resolve(__dirname, 'lib', 'index'),
OPFSDB: path.resolve(__dirname, 'lib', 'OPFSDB'),
Strategy: path.resolve(__dirname, 'lib', 'Strategy'),
DatabaseManager: path.resolve(__dirname, 'lib', 'DatabaseManager'),
WorkerManager: path.resolve(__dirname, 'lib', 'WorkerManager'),
['workers/DedicatedWorkerController']: path.resolve(__dirname, 'lib', 'workers', 'DedicatedWorkerController'),
['workers/SharedWorkerController']: path.resolve(__dirname, 'lib', 'workers', 'SharedWorkerController'),
},
name: 'OPFSDB',
formats: ['es', 'cjs'],
},
rollupOptions: {
external: ['serializable-bptree', 'cbor-x', 'deepmerge'],
},
},
plugins: [tsconfigPaths(), dts({ include: 'lib' })],
})