rano/svelte.config.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

import adapter from "@sveltejs/adapter-static";
const dev = process.env.NODE_ENV === "development";
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
appDir: "./client",
files: {
appTemplate: "./client/app.html",
routes: "./client/routes",
lib: "./client/lib",
assets: "./client/public",
},
alias: {
"$image/*": "./client/assets/image/*",
"$svg/*": "./client/assets/svg/*",
},
paths: {
assets: dev ? "" : (process.env.ASSETS_HOST ?? ""),
},
version: {
name: `v-${Date.now()}`,
pollInterval: 1000 * 60 * 1, // 5 minutes
},
adapter: adapter({
pages: ".client-build",
assets: ".client-build",
fallback: "404.html",
strict: true,
}),
},
};
export default config;