-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
32 lines (31 loc) · 898 Bytes
/
vite.config.js
File metadata and controls
32 lines (31 loc) · 898 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
29
30
31
32
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
export default defineConfig({
resolve: process.env.VITEST
? {
conditions: ['browser']
}
: undefined,
test: {
// If you are testing components client-side, you need to setup a DOM environment.
// If not all your files should have this environment, you can use a
// `// @vitest-environment jsdom` comment at the top of the test files instead.
environment: 'jsdom',
setupFiles: './vitest.setup.ts'
},
plugins: [
tailwindcss(),
sveltekit(),
monacoEditorPlugin.default({
languageWorkers: ['editorWorkerService', 'json']
})
],
ssr: {
noExternal: ['monaco-editor']
},
optimizeDeps: {
include: ['monaco-editor', '@urql/svelte']
}
})