-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
64 lines (63 loc) · 1.71 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
63
64
import { resolve } from 'path';
// import devtools from 'solid-devtools/vite';
import { DOMElements, SVGElements } from 'solid-js/web/dist/dev.cjs';
import { defineConfig } from 'vite';
import inspect from 'vite-plugin-inspect';
import solidPlugin from 'vite-plugin-solid'
export default defineConfig({
resolve: {
alias: {
'@interfaces': resolve(__dirname, './src/interfaces'),
'@components': resolve(__dirname, './src/components'),
'@routes': resolve(__dirname, './src/routes'),
'@pages': resolve(__dirname, './src/pages'),
'@styles': resolve(__dirname, './src/styles'),
'@config': resolve(__dirname, './src/config'),
'@src': resolve(__dirname, './src'),
'@assets': resolve(__dirname, './src/assets'),
'@hooks': resolve(__dirname, './src/utils/hooks'),
'@screens': resolve(__dirname, './src/screens'),
'@store': resolve(__dirname, './src/store'),
'@static': resolve(__dirname, './src/static'),
'@utils': resolve(__dirname, './src/utils'),
},
},
assetsInclude: ['**/*.glb', '**/*.gltf'],
plugins: [
/*
Uncomment the following line to enable solid-devtools.
For more info see https://github.com/thetarnav/solid-devtools/tree/main/packages/extension#readme
*/
// devtools(),
solidPlugin({
solid: {
moduleName: 'solid-js/web',
generate: 'universal',
renderers: [
{
name: 'dom',
moduleName: 'solid-js/web',
elements: [...DOMElements.values(), ...SVGElements.values()],
},
{
name: 'universal',
moduleName: 'solid-three',
elements: [],
},
],
},
}),
inspect(),
],
server: {
port: 3000,
host: true,
strictPort: true,
watch: {
usePolling: true,
},
},
build: {
target: 'esnext',
},
});