2024-07-11 11:00:51 +08:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
import path from 'path';
|
2024-12-30 08:26:40 +08:00
|
|
|
const projectRoot = __dirname;
|
|
|
|
|
|
|
|
// This can be replaced with `find-yarn-workspace-root`
|
|
|
|
const monorepoRoot = path.resolve(projectRoot, '../..');
|
2024-07-11 11:00:51 +08:00
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [react()],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@web': path.resolve(__dirname),
|
2024-12-30 08:26:40 +08:00
|
|
|
'.prisma/client/index-browser': path.resolve(monorepoRoot, 'node_modules/@prisma/client/index-browser.js')
|
2024-07-11 11:00:51 +08:00
|
|
|
}
|
|
|
|
}
|
2024-12-30 08:26:40 +08:00
|
|
|
})
|