Open History to see the last commit
1import path from 'node:path'
2import { fileURLToPath } from 'node:url'
3import angular from '@analogjs/vite-plugin-angular'
4import { defineConfig } from 'vitest/config'
5import packageJson from './package.json' with { type: 'json' }
6β
7const packageDir = path.dirname(fileURLToPath(import.meta.url))
8const angularQueryEntry = path.join(
9 packageDir,
10 '../angular-query/dist/index.mjs',
11)
12const angularQueryInternalEntry = path.join(
13 packageDir,
14 '../angular-query/dist/internal.mjs',
15)
16β
17export default defineConfig({
18 oxc: {
19 target: 'es2022',
20 },
21 plugins: [angular({ tsconfig: './tsconfig.spec.json' })],
22 resolve: {
23 alias: {
24 '@tanstack/angular-query/internal': angularQueryInternalEntry,
25 '@tanstack/angular-query': angularQueryEntry,
26 '@tanstack/query-devtools': path.join(
27 packageDir,
28 '../query-devtools/src/index.ts',
29 ),
30 },
31 },
32 test: {
33 name: packageJson.name,
34 dir: './src',
35 watch: false,
36 environment: 'jsdom',
37 setupFiles: ['./test-setup.ts'],
38 coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },
39 include: ['**/*.{test,spec}.{ts,mts,cts,tsx,js,mjs,cjs,jsx}'],
40 globals: true,
41 restoreMocks: true,
42 },
43})