mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
29 lines
568 B
TypeScript
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',
|
|
},
|
|
});
|