28 lines
620 B
TypeScript
28 lines
620 B
TypeScript
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"react-query": "@tanstack/react-query",
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
onwarn(warning, warn) {
|
|
if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes('use client')) {
|
|
return;
|
|
}
|
|
warn(warning);
|
|
},
|
|
},
|
|
},
|
|
})
|