Spaces:
Running
Running
File size: 1,029 Bytes
60b6623 ce534b9 0ad5d66 52c6e82 ce534b9 a512f4a 09ecaf7 52c6e82 0ad5d66 52c6e82 0ad5d66 1dc6a03 52c6e82 1dc6a03 60b6623 52c6e82 60b6623 ce534b9 |
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 |
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'node:path'
export default defineConfig({
base: '/',
plugins: [react()],
resolve: {
// Make EVERY import of react/react-dom resolve to this one location
alias: {
react: path.resolve(__dirname, 'node_modules/react'),
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
},
dedupe: ['react', 'react-dom'],
},
optimizeDeps: {
include: ['react', 'react-dom', 'react/jsx-runtime'], // add jsx-runtime
},
build: {
// ⛔ TEMP: comment out your manualChunks block while we test
// rollupOptions: { output: { manualChunks: { ... } } },
chunkSizeWarningLimit: 1000,
},
server: {
proxy: { '/api': { target: 'http://localhost:8000', changeOrigin: true, secure: false } },
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
css: true,
deps: { inline: ['@ifrc-go/ui'] },
},
})
|