babel-plugin-jsx/vitest.config.ts

26 lines
525 B
TypeScript
Raw Normal View History

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