forked from Alia5/lovelace-expander-card
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
vite.config.js
35 lines (30 loc) · 892 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
35
/* eslint-disable no-console */
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
svelte()
],
build: {
sourcemap: true,
lib: {
entry: 'src/index.ts',
name: 'ExpanderCard', // Name der globalen Variable für UMD/IIFE
fileName: 'expander-card', // Basisname der generierten Datei
}
},
rollupOptions: {
output: {
entryFileNames: 'expander-card.js' // Dateiname der generierten Haupt-JS-Datei
}
}
});
process
.on('unhandledRejection', (reason, p) => {
console.error(reason, 'Unhandled Rejection at Promise', p);
process.exit(1);
})
.on('uncaughtException', (err) => {
console.error(err, 'Uncaught Exception thrown');
process.exit(1);
});