-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvite.config.ts
More file actions
31 lines (29 loc) · 788 Bytes
/
vite.config.ts
File metadata and controls
31 lines (29 loc) · 788 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
30
31
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tsconfigPaths from 'vite-tsconfig-paths'
import dts from 'vite-plugin-dts'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tsconfigPaths(), dts()],
build: {
emptyOutDir: true,
lib: {
entry: resolve(__dirname, 'index.ts'),
name: 'react-tweakpane',
fileName: 'index',
formats: ['cjs', 'es'],
},
rollupOptions: {
input: {
main: resolve(__dirname, 'src'),
},
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['react', 'react-dom', 'three', 'tweakpane', '@tweakpane/core'],
},
},
server: {
port: 3000,
},
})