renamed dir client to web

This commit is contained in:
2024-10-31 20:31:22 +05:30
parent ad57664a3e
commit e41d27cf97
24 changed files with 110 additions and 1070 deletions

View File

@@ -1,7 +1,6 @@
import adapter from "@sveltejs/adapter-static";
const dev = process.env.NODE_ENV === "development";
const webDir = "./web";
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
@@ -9,28 +8,27 @@ const config = {
// 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",
appTemplate: `${webDir}/app.html`,
routes: `${webDir}/routes`,
lib: `${webDir}/lib`,
assets: `${webDir}/public`,
},
alias: {
"$image/*": "./client/assets/image/*",
"$svg/*": "./client/assets/svg/*",
"$image/*": `${webDir}/assets/image/*`,
"$svg/*": `${webDir}/assets/svg/*`,
},
paths: {
assets: dev ? "" : (process.env.ASSETS_HOST ?? ""),
assets: 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",
pages: `${webDir}/public/build`,
assets: `${webDir}/public/build`,
fallback: "fallback.html",
strict: true,
}),
},