37 lines
846 B
Django/Jinja
37 lines
846 B
Django/Jinja
{% if frontend_adapter == 'bun' -%}
|
|
import adapter from "svelte-adapter-bun";
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
compilerOptions: {
|
|
runes: ({ filename }) =>
|
|
// biome-ignore lint/performance/useTopLevelRegex: svelte default behaviour
|
|
filename.split(/[/\\]/).includes("node_modules") ? undefined : true,
|
|
},
|
|
kit: {
|
|
adapter: adapter(),
|
|
},
|
|
};
|
|
|
|
export default config;
|
|
{%- else -%}
|
|
import adapter from "@sveltejs/adapter-static";
|
|
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
kit: {
|
|
adapter: adapter({
|
|
assets: "build",
|
|
fallback: "index.html",
|
|
pages: "build",
|
|
precompress: false,
|
|
strict: false,
|
|
}),
|
|
},
|
|
preprocess: vitePreprocess(),
|
|
};
|
|
|
|
export default config;
|
|
{%- endif %}
|