Skip to content

BevanR/vite-plugin-vue1

 
 

Repository files navigation

vite-plugin-vue1

Unsupported.

Forked and hacked from vite-plugin-vue2

Install

// vite.config.js
import { createVue1Plugin } from 'vite-plugin-vue1'

export default {
  plugins: [
    createVue1Plugin(/* 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

About

Vue2 plugin for Vite

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 91.0%
  • Vue 7.5%
  • Other 1.5%