Skip to content

Commit

Permalink
fix(sanity): fix issues with tests failing without build
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Oct 3, 2024
1 parent ffcb48c commit 365de64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/sanity/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import path from 'node:path'

import {defineConfig} from '@repo/test-config/vitest'
import react from '@vitejs/plugin-react'

Expand All @@ -10,6 +12,14 @@ export default defineConfig({
'./playwright-ct',
'./src/_internal/cli', // the CLI has its own jest config
],
/**
* Portabletext package depends on monorepo packages that are not necessarily the same version
* as the latest sanity packages. pnpm dedupes this packages so the aliases do not work in this case.
* This alias points to the source of the pte package so the aliases work.
*/
alias: {
'@portabletext/editor': path.join(__dirname, './node_modules/@portabletext/editor/src'),
},
},
plugins: [react()],
})

0 comments on commit 365de64

Please sign in to comment.