-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
62 lines (60 loc) · 1.55 KB
/
vite.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
53
54
55
56
57
58
59
60
61
62
import UnoCSS from '@unocss/vite';
import { resolve } from 'path';
import solidDevtools from 'solid-devtools/vite';
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import solidSvg from 'vite-plugin-solid-svg';
import topLevelAwait from 'vite-plugin-top-level-await';
import wasm from 'vite-plugin-wasm';
import vitePluginArraybuffer from './packages/vite-plugin-arraybuffer/src/main';
const root = resolve(__dirname, 'src');
const packages = resolve(__dirname, 'packages');
export default defineConfig({
plugins: [
wasm(),
topLevelAwait(),
solidDevtools({
/* features options - all disabled by default */
autoname: true // e.g. enable autoname
}),
UnoCSS({
// your config or in uno.config.ts
}),
solidPlugin(),
solidSvg(),
vitePluginArraybuffer()
// viteFBXPlugin(),
],
server: {
port: 3200,
host: '0.0.0.0'
},
publicDir: './public',
resolve: {
alias: {
'@utils': resolve(packages, 'solid-utils'),
'@packages': resolve(packages),
'@/ldtk-ts': resolve(packages, 'ldtk-ts')
}
},
build: {
assetsInlineLimit: 0,
chunkSizeWarningLimit: 5000
// minify: false
},
test: {
environment: 'happy-dom',
transformMode: {
web: [/\.[jt]sx?$/]
},
// solid needs to be inline to work around
// a resolution issue in vitest:
deps: {
inline: [/solid-js/]
}
// if you have few tests, try commenting one
// or both out to improve performance:
// threads: false,
// isolate: false,
}
});