mirror of
https://github.com/morten-olsen/plainidx.git
synced 2026-02-08 01:06:24 +01:00
init
This commit is contained in:
25
packages/tests/vitest.config.ts
Normal file
25
packages/tests/vitest.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference types="vitest" />
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { findWorkspaceDir } from '@pnpm/find-workspace-dir';
|
||||
import { findWorkspacePackages } from '@pnpm/find-workspace-packages';
|
||||
|
||||
const root = await findWorkspaceDir(process.cwd());
|
||||
if (!root) {
|
||||
throw new Error('No workspace found');
|
||||
}
|
||||
const packages = await findWorkspacePackages(root);
|
||||
|
||||
const alias = Object.fromEntries(
|
||||
packages.map(({ dir, manifest }) => [
|
||||
manifest.name!,
|
||||
resolve(dir, 'src', 'exports.ts'),
|
||||
]),
|
||||
);
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
alias,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user