All checks were successful
Deploy production / deploy (push) Successful in 2m56s
- Header/footer moved to #lib/components/SiteChrome.svelte, returned by a universal +layout.ts load only for non-immersive pages, so /start and the book reader never download icon libraries, dropdowns or the bits-ui Sheet. /start: 36 -> 18 JS files, 133 -> 78 KB gzip. - Header logo is a hashed asset (inlined), so it is cached with the build. - inlineStyleThreshold 4096: tiny page/component CSS is inlined into the HTML. - Umami is not loaded on /start.
44 lines
1.4 KiB
TypeScript
Executable File
44 lines
1.4 KiB
TypeScript
Executable File
import adapter from '@sveltejs/adapter-bun';
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
import Icons from 'unplugin-icons/vite';
|
|
import { enhancedImages } from '@sveltejs/enhanced-img';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
enhancedImages(),
|
|
sveltekit({
|
|
// Consult https://svelte.dev/docs/kit/integrations#preprocessors
|
|
// for more information about preprocessors
|
|
preprocess: vitePreprocess(),
|
|
|
|
// Production runs `bun ./build` behind Caddy, which terminates TLS. Without
|
|
// paths.origin the server takes the host from the Host header and assumes
|
|
// https, which is right for both staging and production from one image.
|
|
adapter: adapter(),
|
|
|
|
// Inline tiny stylesheets (component/page CSS) into the HTML: one request fewer per
|
|
// page. The big shared app.css stays a cached /_app/immutable file.
|
|
inlineStyleThreshold: 4096,
|
|
|
|
csrf: {
|
|
// Allow form posts from the dev site, which Caddy also serves over https.
|
|
trustedOrigins: ['https://dev.stanrunge.dev']
|
|
}
|
|
}),
|
|
Icons({ compiler: 'svelte' })
|
|
],
|
|
test: { include: ['src/**/*.{test,spec}.{js,ts}'] },
|
|
server: {
|
|
host: '127.0.0.1',
|
|
allowedHosts: ['dev.stanrunge.dev'],
|
|
hmr:
|
|
process.env.AUTH_E2E === '1'
|
|
? false
|
|
: { host: 'dev.stanrunge.dev', protocol: 'wss', clientPort: 443 }
|
|
}
|
|
});
|