Files
vercel__workflow/workbench/vite/vite.config.ts
Rihan Arfan c1242e8dc5 [nitro] Use nitro v3 functionRules for workflow routes (#1575)
Signed-off-by: Peter Wielander <peter.wielander@vercel.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Peter Wielander <peter.wielander@vercel.com>
2026-05-20 08:34:45 +00:00

24 lines
798 B
TypeScript

import { fileURLToPath } from 'node:url';
import { nitro } from 'nitro/vite';
import { defineConfig } from 'vite';
import { workflow } from 'workflow/vite';
export default defineConfig({
plugins: [nitro(), workflow()],
// Mirror the `@repo/*` tsconfig path alias for Vite's bundler. Nitro
// dropped automatic tsconfig-paths resolution in 3.0.1-alpha.2 and
// removed the `experimental.tsconfigPaths` opt-in in 3.0.260415-beta+.
// The symlinked example workflows (e.g. `99_e2e.ts`) import from
// `@repo/lib/...`, so without this alias the Vite/Rollup build fails
// to resolve those imports.
resolve: {
alias: {
'@repo': fileURLToPath(new URL('../../', import.meta.url)),
},
},
nitro: {
serverDir: './',
plugins: ['plugins/start-pg-world.ts'],
},
});