import type { Plugin } from 'vitest/config'; /** * A Vite/Vitest plugin that transforms Stencil component source files (.tsx) on-the-fly, * enabling module mocking and direct source imports during tests. * * The compiled output uses `componentExport: 'customelement'`, which appends a * `customElements.define()` call at the end of the transformed file. The component * registers itself the moment the module is imported - no dist loader or setup file * required. Works with `@stencil/core` v4 and v5. * * @example * ```ts * // vitest.config.ts * import { defineVitestConfig } from '@stencil/vitest/config'; * import { stencilVitestPlugin } from '@stencil/vitest/plugin'; * * export default defineVitestConfig({ * plugins: [stencilVitestPlugin()], * test: { * projects: [ * { * test: { * name: 'stencil', * environment: 'stencil', * include: ['**\/*.spec.tsx'], * // No dist loader needed - import components from source directly * }, * }, * ], * }, * }); * ``` * @param opts Optional configuration for the plugin * @returns a Vite plugin configuration object */ export declare function stencilVitestPlugin(opts?: { css?: boolean; }): Plugin; //# sourceMappingURL=plugin.d.ts.map