Init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { TanStackRouterVite as TanStackRouterPlugin } from '@tanstack/router-plugin/vite'
|
||||
import path from 'node:path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
TanStackRouterPlugin({ target: 'react', autoCodeSplitting: true }),
|
||||
react(),
|
||||
tailwindcss(),
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: '@', replacement: path.resolve(__dirname, './src') },
|
||||
{
|
||||
find: '@telemt/ui/components',
|
||||
replacement: path.resolve(__dirname, '../../packages/ui/src/components'),
|
||||
},
|
||||
{
|
||||
find: '@telemt/ui/hooks',
|
||||
replacement: path.resolve(__dirname, '../../packages/ui/src/hooks'),
|
||||
},
|
||||
{
|
||||
find: '@telemt/ui/lib/utils',
|
||||
replacement: path.resolve(__dirname, '../../packages/ui/src/lib/utils.ts'),
|
||||
},
|
||||
{
|
||||
find: '@telemt/shared',
|
||||
replacement: path.resolve(__dirname, '../../packages/shared/src/index.ts'),
|
||||
},
|
||||
],
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/health': {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/ready': {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/install-agent.sh': {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'happy-dom',
|
||||
globals: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user