1.4.0 • Published 3 years ago

@vue/babel-preset-jsx v1.4.0

Weekly downloads
1,030,675
License
MIT
Repository
github
Last release
3 years ago

@vue/babel-preset-jsx

Configurable preset for Vue JSX plugins.

Babel Compatibility Notes

Usage

Install the dependencies:

# for yarn:
yarn add @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props
# for npm:
npm install @vue/babel-preset-jsx @vue/babel-helper-vue-jsx-merge-props --save

In your babel.config.js:

module.exports = {
  presets: ['@vue/babel-preset-jsx'],
}

You can toggle specific features, by default all features (except compositionAPI) are enabled, e.g.:

module.exports = {
  presets: [
    [
      '@vue/babel-preset-jsx',
      {
        vModel: false,
        compositionAPI: true,
      },
    ],
  ],
}

Options are:

  • compositionAPI - Enables @vue/babel-sugar-composition-api-inject-h and @vue/babel-sugar-composition-api-render-instance, support returning render function in setup.
    • The default value is false;
    • When set to 'auto' (or true), it will detect the Vue version in the project. If it's >= 2.7, it will import the composition utilities from vue, otherwise from @vue/composition-api;
    • When set to 'native' (or 'naruto'), it will always import the composition utilities from vue
    • When set to plugin, it will always import the composition utilities from @vue/composition-api, but it will redirect to 'vue' itself when the vue version is 2.7.x
    • When set to vue-demi, it will always import the composition utilities from vue-demi
    • When set to an object like { importSource: string; }, it will always import the composition utilities from the importSource you set
  • functional @vue/babel-sugar-functional-vue - Functional components syntactic sugar
  • injectH @vue/babel-sugar-inject-h - Automatic h injection syntactic sugar
  • vModel @vue/babel-sugar-v-model - vModel syntactic sugar
  • vOn @vue/babel-sugar-v-on - vOn syntactic sugar
crud-spuerv-select-libvue-taiwain-idvuepress-theme-yehan@yzone/test-file@yzone/testtwill-uielectronic-uishcce-uivuepress-theme-useweblucky-turn-tablefx-webpack-ttknuxt-compactnuxt2eslink-cli@willhayes/want-clicgdemouipoi_viewsrm-ui-mkbc-ui-cli-v2@jkyu/emp-vue3@startdt/next-preset-apprty-scaffold@startdt/babel-preset-appkedacom-testmillions-pcelement-form-tableuennki-ui@gentean/smart-buildbabel-preset-rvepcs-empty-template@nbfe/parcevvi-uiweatherlo@infinitebrahmanuniverse/nolb-_vue_nienui-testpds-formmakingsuwell-weboffice1@everything-registry/sub-chunk-994tabel-to-csvsyue-clitest-npm-publish-buttonwind-ui-vuewinbox-uiwm-vuewe-element-vuewdc-charts-vuevue-moveable-v3vue-nesting-form-makervue-nesting-form-maker-btvue-nsxvue-hotkey-v3wf-components-vue2xbb-devwheat-uixj-babel-preset-appxiwi-global-pagexiwicloud-global-componentsxiwicloud-global-uitest_mowi_componenttext-xxxthea-uithor-designthinkduan-uivora-servervite-plugin-injs-jsxvite-plugin-vue2vite-plugin-vue2-custvite-plugin-vue2-enhancedvite-plugin-vue2-jsxvite-plugin-vue2-plusvite-plugin-vue2-win-slash-u-bugfixvite-plugin-vue27-jsxvite-plugin-vue2dot6vnext-demovite-vue3-imvite-require-images-to-importvite-plugin-router-resolvevue-drag-table-treevue-file-viewvue-formula-editorvmom-ui-frameworkvue-debug-plugin@creativecommons/vue-vocabulary@ctsj/buildv@curupira/vue-components-ui@curupira/vue-mapbox@dovca/nuxt-babel-preset-app@cailei/cli@rsbuild/plugin-vue2-jsx@rucloud/pkg-vue-devanqinmanagermentdpape-webpack-vue-cliiwant-admin-webjt-vitejaminchartskd-mobile-platformjx-components-libsjsx-test-dev-555knight-cli
1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

1.0.0-beta.3

6 years ago

1.0.0-beta.2

6 years ago

1.0.0-beta.1

6 years ago

0.1.0

7 years ago