-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
36 lines (34 loc) · 973 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
34
35
36
import path from 'path';
import { defineConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import autoExternal from 'rollup-plugin-auto-external';
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, 'framefusion.ts'),
name: 'framefusion.ts',
fileName: (format) => {
if (format === 'es') {
return 'framefusion.es.js';
}
if (format === 'cjs') {
return 'framefusion.cjs';
}
throw new Error(`Please provide a fileName for ${format}`);
},
formats: ['es', 'cjs'],
},
rollupOptions: {
external: ['node:https'],
},
sourcemap: true,
},
define: {
global: {},
},
optimizeDeps: {
disabled: true,
},
plugins: [autoExternal(), eslint()],
});