mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-12-09 15:09:40 +08:00
32 lines
604 B
TypeScript
32 lines
604 B
TypeScript
import { babel } from '@rollup/plugin-babel'
|
|
import { defineConfig } from 'vitest/config'
|
|
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) => tag.startsWith('x-'),
|
|
},
|
|
],
|
|
],
|
|
}),
|
|
],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
},
|
|
})
|