vite-plugin-vue2

Vite plugin for Vue2
1,474,659 618
Install
npm install vite-plugin-vue2
Latest Version:2.0.3
Vue:2
License:MIT
Last Updated:Feb 16, 2023
Links: GitHub  ·  npm
Maintainer: null~

vite-plugin-vue2

NPM version

⚠️ With the release of Vue 2.7, Vite now provides the official Vue 2 plugin @vitejs/plugin-vue2. Thereby this plugin has entered maintenance mode and will only support Vue 2.6 or earlier. This project will reach End of Life by the end of 2022.

Install

npm install vite-plugin-vue2 -D
// vite.config.js
import { createVuePlugin } from 'vite-plugin-vue2'

export default {
  plugins: [
    createVuePlugin(/* options */)
  ],
}

Options

vueTemplateOptions

Type: Object

Default: { compilerOptions :{ whitespace: 'condense' } }

Note { whitespace: 'condense' } behavior

  • A whitespace-only text node between element tags is removed if it contains new lines. Otherwise, it is condensed into a single space.

  • Consecutive whitespaces inside a non-whitespace-only text node are condensed into a single space.

Using condense mode will result in smaller compiled code size and slightly improved performance. However, it will produce minor visual layout differences compared to plain HTML in certain cases,if you want to keep whitespace behavior, please set { whitespace: 'preserve' }

The options for @vue/component-compiler-utils.

jsx

Type: Boolean Default: false

The options for jsx transform.

jsxOptions

Type: Object

The options for @vue/babel-preset-jsx.

target

Type: String

The options for esbuild to transform script code

Todo

  • SSR Build
  • Sourcemap

Related Packages

vite-plugin-git-revision

Vite plugin that generates VERSION and COMMITHASH files during build based on a...

21,961 11
@koala/yibin-ui

宜宾大脑主题定制

4,077
vite-plugin-vue2-plus

Vite plugin for Vue2

854 618
@yfwz100/vite-plugin-vue2-i18n

The missing vue 2 SFC version of vite plugin for vue-i18n, inspired by the rollu...

147,915 6
@dullar/mercury

Advanced and highly reusable Mobile UI Components built on Vue2 & You can define...

8,553 6

Version History

Version Released License
2.0.3 MIT
2.0.2 MIT
2.0.1 MIT
2.0.0 MIT
1.9.3 MIT