跳到主要内容
FarmFarm
Version: 1.x
本页目录

@farmfe/plugin-react

支持 React Jsx 和 React Refresh

Installation

sh
npm add @farmfe/plugin-react
sh
yarn add @farmfe/plugin-react
sh
pnpm add @farmfe/plugin-react
sh
bun add @farmfe/plugin-react

Usage

@farmfe/plugin-react 是一个 Rust 插件,你只需要在 farm.config.ts 的 plugins 字段中配置它的包名。

ts
import { UserConfig } from '@farmfe/core';

const config: UserConfig = {
  plugins: ['@farmfe/plugin-react', { /** options here */}]
}

Options

请参阅SWC 转换 React 选项。

100%

Drag or pinch to explore. Keyboard: + / − zoom, arrows pan, 0 resets, Esc closes.