# jsx-vue2 **Repository Path**: vuejs/jsx-vue2 ## Basic Information - **Project Name**: jsx-vue2 - **Description**: monorepo for Babel / Vue JSX related packages - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-03 - **Last Updated**: 2025-06-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Babel Preset JSX > [!CAUTION] > Vue 2 has reached EOL, and this project is no longer actively maintained. Configurable Babel preset to add Vue JSX support. See the [configuration options here](./packages/babel-preset-jsx). ## Compatibility This repo is only compatible with: - **Babel 7+**. For Babel 6 support, use [vuejs/babel-plugin-transform-vue-jsx](https://github.com/vuejs/babel-plugin-transform-vue-jsx) - **Vue 2+**. JSX is not supported for older versions. For Vue 3 support, please use [`@vue/babel-plugin-jsx`](https://github.com/vuejs/babel-plugin-jsx). ## Installation Install the preset with: ```bash npm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props ``` Then add the preset to `babel.config.js`: ```js module.exports = { presets: ['@vue/babel-preset-jsx'], } ``` ## Syntax ### Content ```jsx render() { return
hello
} ``` with dynamic content: ```jsx render() { returnhello { this.message }
} ``` when self-closing: ```jsx render() { return } ``` with a component: ```jsx import MyComponent from './my-component' export default { render() { returnhello {props.message}
``` or PascalCase variable declarations: ```jsx const HelloWorld = ({ props }) =>hello {props.message}
```