vitest-react-native icon indicating copy to clipboard operation
vitest-react-native copied to clipboard

TypeError: jsxDEV is not a function

Open wojtekmaj opened this issue 9 months ago • 1 comments

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? 🤔

wojtekmaj avatar Sep 15 '23 12:09 wojtekmaj