-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (32 loc) · 990 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
import { defineConfig } from 'vite';
import { nodeJsExternal } from './src/vite';
import typescript from '@rollup/plugin-typescript';
export default defineConfig({
ssr: {
noExternal: true,
},
esbuild: {
platform: 'neutral',
},
build: {
outDir: __dirname + '/dist',
ssr: true,
lib: {
formats: ['es'],
entry: {
'index': __dirname + '/src/index.ts',
'nodejs': __dirname + '/src/nodejs/index.ts',
'sqlite3': __dirname + '/src/sqlite3/index.ts',
'firestore': __dirname + '/src/firestore/index.ts',
'vite': __dirname + '/src/vite/index.ts',
'cli': __dirname + '/src/cli.ts',
},
},
sourcemap: 'hidden',
emptyOutDir: true,
rollupOptions: {
external: [...nodeJsExternal, 'sqlite3', 'firebase-admin/firestore', '@rollup/plugin-typescript', 'reflect-metadata', '@swc/core', '@rollup/plugin-swc', 'fsevents', 'vite'],
}
},
plugins: [typescript({ declaration: false })],
});