36 lines
745 B
TypeScript
36 lines
745 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import wasm from 'vite-plugin-wasm'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss(), wasm()],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/__tests__/setup.ts'],
|
|
css: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'nkode-client-wasm': path.resolve(__dirname, 'pkg'),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/v1': {
|
|
target: 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
fs: {
|
|
allow: ['..'],
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ['nkode-client-wasm'],
|
|
},
|
|
})
|