Files
libnovel/ui/vite.config.ts
Admin 0a3a61a3ef
Some checks failed
CI / Backend (pull_request) Successful in 41s
CI / UI (pull_request) Failing after 27s
CI / UI (push) Failing after 27s
CI / Backend (push) Successful in 48s
Release / Test backend (push) Successful in 23s
Release / Check ui (push) Failing after 33s
Release / Docker / ui (push) Has been skipped
Release / Docker / caddy (push) Failing after 52s
Release / Docker / backend (push) Failing after 11s
Release / Docker / runner (push) Successful in 1m51s
Release / Gitea Release (push) Has been skipped
feat(i18n): add Paraglide i18n with 5 locales (v2.3.22)
- Install @inlang/paraglide-js v2.15.1; configure project.inlang settings
- Add en/ru/id/pt-BR/fr message catalogues (~140 keys each)
- Wire paraglideVitePlugin in vite.config.ts, reroute hook in hooks.ts,
  and paraglideHandle middleware in hooks.server.ts
- Migrate all routes and shared components to use m.*() message calls
- Fix duplicate onMount body in chapters/[n]/+page.svelte
- Build passes; svelte-check: 0 errors, 3 pre-existing warnings
2026-03-29 10:43:53 +05:00

33 lines
983 B
TypeScript

import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { paraglideVitePlugin as paraglide } from '@inlang/paraglide-js';
import { defineConfig } from 'vite';
// Source maps are always generated so that the CI pipeline can upload them to
// GlitchTip via glitchtip-cli after a release build.
export default defineConfig({
build: {
sourcemap: true
},
plugins: [
tailwindcss(),
paraglide({
project: './project.inlang',
outdir: './src/lib/paraglide',
strategy: ['url', 'cookie', 'baseLocale']
}),
sveltekit()
],
ssr: {
// Force these packages to be bundled into the server output rather than
// treated as external requires. The production Docker image has no
// node_modules, so anything used in server-side code must be inlined.
noExternal: ['marked'],
// cropperjs is DOM-only (used inside $effect); exclude from SSR bundle.
external: ['cropperjs']
},
optimizeDeps: {
include: ['cropperjs']
}
});