'use strict'; require('wxt'); const modules = require('wxt/modules'); const react$1 = require('@vitejs/plugin-react'); function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } const react__default = /*#__PURE__*/_interopDefaultCompat(react$1); const react = modules.defineWxtModule({ name: "@wxt-dev/module-react", configKey: "react", setup(wxt, options) { const { vite } = options ?? {}; modules.addViteConfig(wxt, () => ({ plugins: [react__default(vite)] })); modules.addImportPreset(wxt, "react"); wxt.hook("config:resolved", (wxt2) => { var _a; if (wxt2.config.imports === false) return; (_a = wxt2.config.imports).dirsScanOptions ?? (_a.dirsScanOptions = {}); wxt2.config.imports.dirsScanOptions.filePatterns = [ // Default plus JSX/TSX "*.{ts,js,mjs,cjs,mts,cts,jsx,tsx}" ]; }); } }); module.exports = react;