-
Notifications
You must be signed in to change notification settings - Fork 155
/
vite.config.mjs
42 lines (40 loc) · 1.05 KB
/
vite.config.mjs
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
34
35
36
37
38
39
40
41
42
/* eslint-disable import/no-extraneous-dependencies */
import { babel } from '@rollup/plugin-babel';
import dns from 'dns';
import { resolve } from 'path';
import { defineConfig } from 'vite';
dns.setDefaultResultOrder('verbatim');
export default defineConfig({
server: {
port: 8080,
open: true,
},
build: {
minify: 'esbuild',
target: 'es2019',
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.ts'),
name: 'Livekit Client SDK JS',
// the proper extensions will be added
fileName: 'livekit-client',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [],
output: {},
plugins: [
babel({
babelHelpers: 'bundled',
plugins: ['@babel/plugin-proposal-object-rest-spread'],
presets: ['@babel/preset-env'],
extensions: ['.js', '.ts', '.mjs'],
}),
],
},
},
test: {
environment: 'happy-dom',
},
});