babel-plugin-jsx/vitest.config.ts
2024-01-21 17:25:13 +08:00

29 lines
568 B
TypeScript

import { defineConfig } from 'vitest/config';
import { babel } from '@rollup/plugin-babel';
import Jsx from './packages/babel-plugin-jsx/src';
export default defineConfig({
resolve: {
conditions: ['dev'],
},
esbuild: {
jsx: 'preserve',
},
plugins: [
babel({
babelHelpers: 'bundled',
extensions: ['.tsx', '.jsx'],
plugins: [
[
Jsx,
{ optimize: true, isCustomElement: (tag: string) => /^x-/.test(tag) },
],
],
}),
],
test: {
globals: true,
environment: 'jsdom',
},
});