CI proved cross-file sharing of a virtual-module mock body cannot work in
@vitest/browser-playwright 4.1.6: the static-import spread fails the hoist
("no top level variables"), and the await-vi.hoisted-import form fails to
parse ("Unexpected identifier 'vi'"). vi.hoisted has the same hoist
constraint as vi.mock, so there is no way to thread an external module's
body into the factory here.
Reverts Phase 1: restores the 4 $app/forms/$app/navigation specs to their
inline factories, inlines NotificationBell.spec's forms stub, deletes the
src/__mocks__/$app/* modules and the $mocks alias (vite, vitest-coverage,
kit). The no-factory-ban meta-test stays (no-factory vi.mock is still
banned). ADR-012 amended to record the infeasibility. Everything else
($app/state migration, confirm context-inject, notification refactor, the
pin, the meta-test) is unaffected. Part of #560.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
888 B
JavaScript
26 lines
888 B
JavaScript
import adapter from '@sveltejs/adapter-node';
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://svelte.dev/docs/kit/integrations
|
|
// for more information about preprocessors
|
|
preprocess: vitePreprocess(),
|
|
kit: {
|
|
adapter: adapter(),
|
|
prerender: {
|
|
entries: ['/hilfe/transkription'],
|
|
// Disable crawl: by default SvelteKit follows nav links from
|
|
// prerendered pages and prerenders the targets too. The targets
|
|
// (/, /documents, /persons, …) throw redirect('/login') during
|
|
// the build (no auth cookie), so SvelteKit bakes a
|
|
// `<script>location.href='/login'</script>` HTML page and serves
|
|
// it before the runtime hooks ever run. Result: authenticated
|
|
// users with a valid cookie still get bounced. See #514.
|
|
crawl: false
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|