-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
36 lines (34 loc) · 1005 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
36
import { resolve } from 'path';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import sveltePreprocess from 'svelte-preprocess';
import banner from 'vite-plugin-banner';
import { readFile } from 'fs/promises';
const pkg = JSON.parse(await readFile(new URL('./package.json', import.meta.url)));
export default {
build: {
type: ['iife', 'es'],
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'pinturainput',
fileName: 'pinturainput',
formats: ['es', 'iife'],
},
rollupOptions: {
output: {
globals: 'pinturainput',
},
},
},
plugins: [
svelte({
/* plugin options */
preprocess: sveltePreprocess({}),
}),
banner(`/*!
* Pintura Input v${pkg.version}
* (c) 2018-${new Date().getFullYear()} PQINA Inc. - All Rights Reserved
* License: https://pqina.nl/pintura/license/
*/
/* eslint-disable */`),
],
};