JSPM

@wxt-dev/module-react

1.1.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 61414
  • Score
    100M100P100Q154694F
  • License MIT

WXT module to enable React support

Package Exports

  • @wxt-dev/module-react

Readme

@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: {
      // ...
    },
  },
});