Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

vite.config.ts

23 lines695 Bytes

1import { dirname, resolve } from 'node:path'
2import { fileURLToPath } from 'node:url'
3import { defineConfig } from 'vite'
4​
5const appDirectory = dirname(fileURLToPath(import.meta.url))
6​
7export default defineConfig({
8 resolve: {
9 alias: {
10 vitest: resolve(appDirectory, `src/runtime-vitest.ts`),
11 'node:crypto': resolve(appDirectory, `src/node-crypto.ts`),
12 '@tanstack/db': resolve(appDirectory, `../../../db/src`),
13 '@tanstack/db-ivm': resolve(appDirectory, `../../../db-ivm/src`),
14 '@tanstack/db-sqlite-persistence-core': resolve(
15 appDirectory,
16 `../../../db-sqlite-persistence-core/src`,
17 ),
18 },
19 },
20 build: {
21 target: `es2022`,
22 },
23})