-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (27 loc) · 865 Bytes
/
vite.config.ts
File metadata and controls
28 lines (27 loc) · 865 Bytes
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
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
server: {
allowedHosts: true
},
ssr: {
noExternal: ['marked', 'dompurify'],
external: ['jsdom', 'cssstyle', 'nwsapi', 'whatwg-url', 'tr46', 'webidl-conversions']
},
optimizeDeps: {
exclude: ['jsdom', 'cssstyle', 'nwsapi', 'whatwg-url', 'tr46', 'webidl-conversions']
},
build: {
rollupOptions: {
external: (id) => {
// Externalize jsdom and its dependencies to avoid bundling issues
return id === 'jsdom' || id.startsWith('jsdom/') ||
id === 'cssstyle' || id.startsWith('cssstyle/') ||
id === 'nwsapi' || id === 'whatwg-url' ||
id === 'tr46' || id === 'webidl-conversions';
}
}
}
});