-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
34 lines (33 loc) · 982 Bytes
/
vite.config.js
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
import { fileURLToPath } from 'url'
import { defineConfig } from 'vite'
import { resolve } from 'path';
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
css: [
"bootstrap/dist/css/bootstrap.min.css",
],
build: {
lib: {
entry: resolve(__dirname, 'src/widget-element.js'),
name: 'OebWidgetsGraphs',
fileName: (format) => `oeb-widgets-graphs.${format}.js`, // Esto genera archivos con los formatos correctos
formats: ['es', 'umd'] // Cambia `formats` a `format`
},
rollupOptions: {
// Asegúrate de externalizar dependencias que no quieres incluir en tu bundle
external: [],
output: {
globals: {
lit: 'lit',
},
},
},
},
server: {
open: './src/demo/index.html',
},
})