mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-11 13:46:17 +00:00
feat: add vercel routes config generator
This is so we do not need to force trailing slashes.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
|
||||
import { wrap } from './src/_vercel-moment.js';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||
@@ -9,13 +11,11 @@ const config = {
|
||||
|
||||
kit: {
|
||||
// adapter-static has vercel detection, but that does not let you set a custom 404 page easily.
|
||||
// Instead, we have to disable it and set trailing slash to always.
|
||||
adapter: adapter({
|
||||
// Instead, we have to use a wrapper that generates a vercel config if on vercel...
|
||||
adapter: wrap(adapter, {
|
||||
pages: "public",
|
||||
fallback: "404.html"
|
||||
}),
|
||||
|
||||
trailingSlash: 'always'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user