1.4.0 • Published 2 years ago

@vue/babel-preset-jsx v1.4.0

Weekly downloads
1,030,675
License
MIT
Repository
github
Last release
2 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-spuer@omnia/tooling-vuev-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-994my-adminmy-minappmy-lib-dafei-2newhope-buildernew-vue3-ywnew-vue3yeweinpwbnpmjs-packageaden-componentsaden-components-aladen-components-bl@zhennann/build@zkey-webapp/buildaf-example-webahoney-cli@amrnn/vuepackbabel-preset-app-ttnbabel-preset-elfbabel-preset-mbpbabel-preset-mobilebabel-preset-minifishbabel-preset-phenixbabel-preset-taro-eazytecbasevuexialuoke@assits/bro-buildbeansflight-json-form@accumula/polaris-vue@ace5040/demo@ace5040/demo3bk-lesscode-draggable-form-builder@backend/renderer-vue@casimir.one/attributes-module@constgen/neutrino-vue-loader@ctsj/buildvcon-uicomplib-cli@curupira/vue-components-ui@curupira/vue-mapbox@devpack/qakit@bigin/bigin-ui-table-column@bkui/babel-preset-bk@bkui/cli-service-globalbravo-vuibpm-framework@blueking/babel-preset-bk@blueking/bk-report-cli@blueking/bkmonitor-cli@blueking/lesscode-cli@blueking/cli-service-global@blueking/bk-monitor-cli@bale-tools/mutate-service@bale-tools/compiler-file@bale-tools/compiler-service@bamboo-dev/cli@buri-ui/cli@bomijs/babel-preset-bomicabin-service-cli@cailei/cli@cabinx/compile-webpackcaptainbi_components
1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.0

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago

1.0.0-beta.1

5 years ago

0.1.0

6 years ago