-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.mts
29 lines (26 loc) · 917 Bytes
/
vite.config.mts
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 { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
return {
resolve: {
dedupe: ['typescript'],
},
build: {
sourcemap: true,
lib: {
entry: 'src/extension.ts',
formats: ['cjs'],
fileName: 'extension'
},
rollupOptions: {
external: [
// Project dependencies
'vscode', 'typescript',
// Node.js built-in modules
'path', 'crypto', 'fs', 'url', 'os', 'http', 'https', 'zlib', 'stream', 'tty', 'util', 'assert', 'events', 'buffer', 'string_decoder', 'punycode', 'querystring', 'assert', 'timers', 'dns', 'net', 'tls', 'dgram', 'child_process', 'cluster', 'readline', 'repl', 'console', 'inspector', 'module', 'perf_hooks', 'worker_threads', 'v8', 'vm', 'async_hooks', 'trace_events',
/^node:/,
],
}
}
};
});