You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
766 B
22 lines
766 B
// Vite configuration of the SvelteKit site. The library tests run with
|
|
// vitest.config.ts, which vitest prefers when both files exist.
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit()],
|
|
build: {
|
|
// Never inline an asset as a data: URL. The CSP allows only the page's
|
|
// own origin, so the official fixtures (src/lib/inspector/fixtures.ts)
|
|
// must be separate same-origin files, whatever their size.
|
|
assetsInlineLimit: 0,
|
|
},
|
|
server: {
|
|
fs: {
|
|
// The dev server serves the official fixtures straight from testdata/,
|
|
// the single source of truth; the build copies them as hashed assets.
|
|
allow: ['testdata/fixtures'],
|
|
},
|
|
},
|
|
});
|