mirror of
https://github.com/n8n-io/n8n.git
synced 2026-08-29 01:39:24 +08:00
deb52ae6e4
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
18 lines
760 B
TypeScript
18 lines
760 B
TypeScript
import path from 'node:path';
|
|
import { mergeConfig } from 'vite';
|
|
import { createVitestConfigWithDecorators } from '@n8n/vitest-config/node-decorators';
|
|
|
|
// Shared base config for both the unit (vite.config.ts) and integration
|
|
// (vitest.config.integration.ts) runs. Test include/exclude is intentionally
|
|
// left to the extending configs so they don't merge-concatenate each other's globs.
|
|
export const baseConfig = mergeConfig(
|
|
// Pin `zod` to its CJS build so `instanceof z.ZodError` holds against the externalized
|
|
// CJS dist. See `cjsPinAliases` in @n8n/vitest-config/node for the rationale.
|
|
createVitestConfigWithDecorators({}, { pinCjs: ['zod'] }),
|
|
{
|
|
resolve: {
|
|
alias: [{ find: '@', replacement: path.resolve(__dirname, './src') }],
|
|
},
|
|
},
|
|
);
|