forked from annotorious/plugin-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
33 lines (32 loc) · 803 Bytes
/
vite.config.js
File metadata and controls
33 lines (32 loc) · 803 Bytes
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
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { sveltePreprocess } from 'svelte-preprocess';
import dts from 'vite-plugin-dts';
export default defineConfig({
plugins: [
svelte({ preprocess: sveltePreprocess() }),
dts({
insertTypesEntry: true,
include: ['./src/'],
entryRoot: './src'
})
],
server: {
open: '/test/index.html'
},
build: {
sourcemap: true,
lib: {
entry: './src/index.ts',
name: 'AnnotoriousTools',
formats: ['es', 'umd'],
fileName: (format) =>
format === 'umd' ? `annotorious-plugin-tools.js` : `annotorious-plugin-tools.es.js`
},
rollupOptions: {
output: {
assetFileNames: 'annotorious-plugin-tools.[ext]'
}
}
}
});