-
-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathvite.worker.config.ts
More file actions
29 lines (28 loc) · 755 Bytes
/
vite.worker.config.ts
File metadata and controls
29 lines (28 loc) · 755 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
import { builtinModules } from 'node:module';
import { defineConfig } from 'vite';
// Configuration for building worker files
// Workers will be built as separate entry points
export default defineConfig({
build: {
// Output to a specific directory for workers
outDir: '.vite/workers',
lib: {
entry: {
gitWorker: 'src/services/git/gitWorker.ts',
wikiWorker: 'src/services/wiki/wikiWorker/index.ts',
},
formats: ['cjs'],
},
rollupOptions: {
external: [
...builtinModules,
...builtinModules.map(m => `node:${m}`),
'threads/worker',
'git-sync-js',
'tiddlywiki',
],
},
// Don't minify workers for easier debugging
minify: false,
},
});