-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
23 lines (22 loc) · 798 Bytes
/
vite.config.ts
File metadata and controls
23 lines (22 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { resolve } from 'path';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
export default defineConfig({
build: {
// Generate sourcemaps for debugging
sourcemap: true,
// Create a library build
lib: {
// The entry point for our library
entry: resolve(__dirname, 'src/index.ts'),
// The global variable name when used in a <script> tag
name: 'VoiceAiWidget',
// The format of the output bundle (Universal Module Definition)
formats: ['umd'],
// The name of the output file
fileName: (format) => `voice-ai-widget.${format}.js`,
},
},
// Add the dts plugin to generate TypeScript declaration files
plugins: [dts()],
});