Files
penpot/plugins/apps/plugin-api-test-suite/vite.config.tests.ts
T
Andrey Antukh 05ea09f2ba ♻️ Make vite configs compatible with the native config loader
Replace __dirname with import.meta.dirname in the plugins workspace
vite configs (root paths and the plugins-runtime tsconfigPath) and in
frontend/vite.config.js, dropping the fileURLToPath fallback.

Import vite.config.iife with the explicit .ts extension in the
plugin-api-test-suite headless/tests configs and allow it in
tsconfig.node.json (moduleResolution Bundler + noEmit), matching the
mcp/packages/plugin precedent.

Remove .storybook/vitest.setup.ts and its setupFiles entry;
@storybook/addon-vitest 10.3+ provisions preview annotations
automatically.

These clear the Vite `configLoader: 'native'` warnings ahead of that
loader becoming the default.

AI-assisted-by: omen-alpha
2026-09-09 08:04:11 +02:00

9 lines
494 B
TypeScript

import { iifeConfig } from './vite.config.iife.ts';
// Builds the test cases as a single self-executing (IIFE) bundle that publishes
// the discovered tests on `globalThis.__penpotReloadedTests`. The UI "Reload"
// button fetches this file and the plugin sandbox `eval`s it to pick up edited
// tests without reopening the plugin. Rebuilt on save by the `watch` script.
// See vite.config.iife.ts for the shared bundle config.
export default iifeConfig('tests-bundle', 'src/tests-bundle.ts');