-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.widget.config.ts
52 lines (51 loc) · 1.26 KB
/
vite.widget.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { defineConfig } from 'vite'
import { resolve } from 'path'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import sveltePreprocess from 'svelte-preprocess'
/** @type {import('vite').UserConfig} */
export default defineConfig({
build: {
sourcemap: true,
target: 'modules',
chunkSizeWarningLimit: 5000,
rollupOptions: {
input: resolve(
__dirname,
'./src/components/web-components/fund-ring-widget.ts'
),
output: {
format: 'iife',
dir: resolve(__dirname, './widget'),
entryFileNames: 'fund-ring-widget.js'
}
}
},
optimizeDeps: {
exclude: ['uint8arrays', 'clipboard-copy', 'web3.storage']
},
plugins: [
svelte({
preprocess: sveltePreprocess(),
exclude: '/.component.svelte$/',
emitCss: false,
}),
svelte({
preprocess: sveltePreprocess(),
include: '/.component.svelte$/',
compilerOptions: {
customElement: true
},
emitCss: false
})
],
resolve: {
alias: {
$components: resolve('./src/components'),
$contracts: resolve('./src/contracts'),
$lib: resolve('./src/lib'),
$routes: resolve('./src/routes'),
$src: resolve('./src'),
$static: resolve('./static')
}
}
})