-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
50 lines (47 loc) · 1.21 KB
/
vite.config.ts
File metadata and controls
50 lines (47 loc) · 1.21 KB
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import Sitemap from 'vite-plugin-sitemap'
//import vercel from 'vite-plugin-vercel';
const hostname = 'https://www.israelagyeman.com';
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../node_modules/.vite/packages/website',
server: {
port: 4200,
host: 'localhost',
},
preview: {
port: 4300,
host: 'localhost',
},
plugins: [
react(),
nodePolyfills(),
Sitemap({ hostname }),
//vercel(),
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
build: {
emptyOutDir: true,
sourcemap: true, // Enable sourcemaps
transformMixedEsModules: true,
reportCompressedSize: true,
commonjsOptions: { transformMixedEsModules: true },
},
test: {
watch: false,
globals: true,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
reporters: ['default'],
coverage: {
reportsDirectory: '../../coverage/packages/website',
provider: 'v8' as const,
},
},
assetsInclude: ['**/*.node'],
}));