Skip to content

khanhduy1407/wite-plugin-kdu2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wite-plugin-kdu2

Install

npm install wite-plugin-kdu2 -D
// wite.config.js
import { createKduPlugin } from 'wite-plugin-kdu2'

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

kduTemplateOptions

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 @kdujs/component-compiler-utils.

jsx

Type: Boolean
Default: false

The options for jsx transform.

jsxOptions

Type: Object

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

target

Type: String

The options for esbuild to transform script code

Todo

  • SSR Build
  • Sourcemap

About

Wite plugin for Kdu2

Resources

Stars

Watchers

Forks

Packages

No packages published