Skip to content
Discussion options

You must be logged in to vote

@finleyjb I wouldn't try to squeeze the Nuxt package into vite.config.ts. Nuxt still expects a vitest.config.ts using @nuxt/test-utils/config, so it's fine to let that package be the exception.

The Vite+ recommendation is mainly about its built-in vp test command, since that reads the test block from vite.config.ts. For the Nuxt workspace, I'd use a normal package script and run it with vp run test:

{
  "scripts": {
    "test": "vitest"
  }
}
// vitest.config.ts
import { defineVitestConfig } from '@nuxt/test-utils/config'

export default defineVitestConfig({
  test: {
    environment: 'nuxt',
  },
})

That should coexist fine with Vite+ at the monorepo root. This package just won't pick up…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@finleyjb
Comment options

Answer selected by finleyjb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants