'use strict'; require('wxt'); const modules = require('wxt/modules'); const vue = require('@vitejs/plugin-vue'); function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } const vue__default = /*#__PURE__*/_interopDefaultCompat(vue); const index = modules.defineWxtModule({ name: "@wxt-dev/module-vue", configKey: "vue", setup(wxt, options) { const { vite } = options ?? {}; modules.addViteConfig(wxt, ({ command }) => ({ // @ts-ignore: Ignore vite version issues plugins: [vue__default(vite)], build: { // Fixes known issue: https://github.com/wxt-dev/wxt/pull/607 sourcemap: false } })); wxt.hook("config:resolved", (wxt2) => { var _a; if (!wxt2.config.imports) return; (_a = wxt2.config.imports).addons ?? (_a.addons = {}); if (!Array.isArray(wxt2.config.imports.addons)) { wxt2.config.imports.addons.vueTemplate = true; } else { wxt2.logger.warn( "Could not enable auto-imports in vue templates when using and array for imports.addons" ); } }); modules.addImportPreset(wxt, "vue"); } }); module.exports = index;