Files
edentext/vite.config.ts
T
Steffen Becker ea39dde58b feat: a tab lands on the file's own grid, and can draw its leader
The default tab interval was fixed at 1.25cm, so a file's own
w:defaultTabStop / style:tab-stop-distance was ignored and the DOCX
export wrote 1.25 back over Word's 1.27. It is a document setting now.

A stop can also carry the character it repeats across its gap. odf-kit
has no leader option and mints one automatic style per option set, so
the leader rides style:type behind a sentinel — matching on position
and alignment alone gave every stop at 6cm the same leader, which
LibreOffice drew back plain as day.
2026-08-08 14:40:26 +00:00

29 lines
1.1 KiB
TypeScript

/// <reference types="vitest/config" />
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import pkg from './package.json' with { type: 'json' };
export default defineConfig({
plugins: [svelte()],
define: { __APP_VERSION__: JSON.stringify(pkg.version) },
// hunspell-asm's ESM chain calls CJS/UMD deps as functions that a bundler
// yields as non-callable namespaces (glue → "runtimeModule is not a function";
// nanoid → CANNOT_CALL_NAMESPACE). The CJS builds' require-interop fixes both.
resolve: {
alias: {
'hunspell-asm': 'hunspell-asm/dist/cjs/index.js',
'emscripten-wasm-loader': 'emscripten-wasm-loader/dist/cjs/index.js',
},
},
// Test-only config; never enters the production bundle (vitest is dev-only).
// jsdom supplies a global DOMParser, so the export/import specs need no setup.
test: {
environment: 'jsdom',
include: ['tests/**/*.test.ts'],
globals: false,
// A build+re-import leg runs ~10s when the whole suite competes for the CPU,
// well past vitest's 5s default.
testTimeout: 60000,
},
});