Import project configuration: cshare-app/vite.config.js
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
build: {
|
||||
cssCodeSplit: true,
|
||||
sourcemap: false,
|
||||
chunkSizeWarningLimit: 450,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return undefined;
|
||||
if (id.includes('/react-router-dom/')) return 'router';
|
||||
if (id.includes('/lenis/')) return 'motion';
|
||||
if (id.includes('/react/') || id.includes('/react-dom/')) return 'react';
|
||||
return 'vendor';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
globals: true,
|
||||
setupFiles: ['./src/test/setup.js'],
|
||||
include: ['src/**/*.test.{js,jsx}'],
|
||||
coverage: {
|
||||
reporter: ['text', 'lcov'],
|
||||
include: ['src/lib/**', 'src/components/**'],
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user