@wxt-dev/module-react
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

@wxt-dev/module-react

Enables the use of React in your web extension, in HTML pages and content scripts.

This plugin makes a few changes:

  1. Adds @vitejs/plugin-react to vite
  2. Adds the react preset to auto-imports

Usage

pnpm i react react-dom
pnpm i -D @wxt-dev/module-react

Then add the module to your config:

// wxt.config.ts
export default defineConfig({
  // Required
  modules: ['@wxt-dev/module-react'],

  // Optional: Pass options to the module:
  react: {
    vite: {
      // ...
    },
  },
});

/@wxt-dev/module-react/

    Package Sidebar

    Install

    npm i @wxt-dev/module-react

    Weekly Downloads

    18,452

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    5.87 kB

    Total Files

    8

    Last publish

    Collaborators

    • _aklinker1