forked from lightning-js/solid-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
38 lines (37 loc) · 1.01 KB
/
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
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import { importChunkUrl } from '@lightningjs/vite-plugin-import-chunk-url';
import legacy from '@vitejs/plugin-legacy';
export default defineConfig({
plugins: [importChunkUrl(), solidPlugin({
solid: {
moduleName: "@lightningjs/solid",
generate: 'universal',
}}),
legacy({
targets: ['defaults', 'not IE 11'],
}),
],
resolve: {
alias: {
theme: 'src/material-theme.json',
},
dedupe: ['solid-js', '@lightningjs/solid'],
},
optimizeDeps: {
include: [],
// This is important for things to work right in `vite` dev mode! Needs more investigation.
exclude: ['@lightningjs/solid',
'@lightningjs/solid-primitives',
'@lightningjs/renderer/core',
'@lightningjs/renderer/workers/renderer']
},
server: {
port: 5174,
hmr: false,
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
},
},
});