-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathvite.config.js
47 lines (46 loc) · 994 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
37
38
39
40
41
42
43
44
45
46
47
import { defineConfig } from 'vite';
import { viteJs13k, viteJs13kPre } from './plugins/vite-js13k'
import kontra from 'rollup-plugin-kontra';
export default defineConfig({
server: {
port: 3000
},
plugins: [
kontra({
gameObject: {
group: true,
ttl: true, // TODO: Figure out exactly what this is needed for
velocity: true,
},
vector: {
angle: true,
distance: true,
normalize: true,
scale: true,
subtract: true,
},
}),
viteJs13kPre(),
viteJs13k(),
],
build: {
minify: 'terser',
terserOptions: {
toplevel: true,
compress: {
passes: 2,
unsafe: true,
unsafe_arrows: true,
unsafe_comps: true,
unsafe_math: true,
},
mangle: { properties: { keep_quoted: false }},
module: true,
},
assetsInlineLimit: 0,
modulePreload: {
polyfill: false,
},
reportCompressedSize: false,
},
});