Skip to content

TypeError: jsxDEV is not a function #12

@wojtekmaj

Description

@wojtekmaj

Shortest repro for me was just:

index.test.tsx

<div />;

I don't see anything suspicious in my configs. My vitest.config.ts:

import { defineConfig } from 'vitest/config';
import reactNative from 'vitest-react-native';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [reactNative(), react()],
});

My tsconfig.json:

{
  "extends": "@tsconfig/react-native/tsconfig.json"
}

Setting compilerOptions.jsx to react, react-jsx, react-jsxdev doesn't seem to do the trick.

Removing react plugin from vitest.config.ts and adding import React from react'; appears to work, but is not an option.

Any ideas? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions