-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
58 lines (56 loc) · 1.55 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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import dotenv from 'dotenv';
dotenv.config();
// vite.config.ts
export default defineConfig({
plugins: [react()],
server: {
host: true,
strictPort: true,
port: process.env.APP_PORT ? parseInt(process.env.APP_PORT, 10) : undefined,
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/__test__/setupTests.ts'],
coverage: {
exclude: [
'tailwind.config.js',
'.prettierrc.cjs',
'postcss.config.js',
'src/App.tsx',
'src/main.tsx',
'src/components/dashBoard/Admin.tsx',
'src/components/dashBoard/Table.tsx',
'src/pages/AddCoupon.tsx',
'src/pages/Coupons.tsx',
'src/pages/EditCoupon.tsx',
'src/pages/customer.tsx',
'src/components/Cart/Cart.tsx',
'src/components/Checkout/Checkout.tsx',
'src/features/Checkout/checkoutSlice.ts',
'src/components/bannerAds/bannerSection.tsx',
'src/components/Checkout/Checkout.tsx',
'src/components/dashBoard/EditProduct.tsx',
'src/components/home/FeaturedSection.tsx',
'src/components/home/BestSellerSection.tsx',
'src/layout/HomeLayout.tsx',
'src/layout/DashbordLayout.tsx',
],
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
external: ['src/App.tsx'],
},
},
});