@whyframe/jsx

@whyframe/jsx exports a Vite plugin, while @whyframe/jsx/loader exports a Webpack loader. They share the same options below, except include and exclude being Vite specific:

Options

include

  • Type: string | RegExp | (string | RegExp)[]
  • Default: /\.[jt]sx$/

A picomatch pattern, or array of patterns, which specifies the files the plugin should operate on.

exclude

  • Type: string | RegExp | (string | RegExp)[]

A picomatch pattern, or array of patterns, which specifies the files to be ignored by the plugin.

defaultFramework

  • Type: 'solid' | 'preact' | 'preact'

The default UI framework for this integration. If not set, it try to fallback to the jsxImportSource option in tsconfig.json or jsconfig.json. This can be overridden per iframe with data-why="<framework>" attribute, or per file with the @jsxImportSource <framework> comment at the top of the JSX file.

parserOptions

Custom parser options to be passed to @babel/parser.