0

I have more or less finished my site development with Svelte.

I would deploy it to my own VPS, which will be using a typical LAMP setup.

I followed the doc and made the changes in svelte.config.js:

import adapter from "@sveltejs/adapter-static";
import { vitePreprocess } from "@sveltejs/kit/vite";

/** @type {import('@sveltejs/kit').Config} */
const config = {
  ...
  kit: {
    adapter: adapter({
      fallback: '404.html'
    }),
  },
};

Then I ran npm run build, it seems no error but I found the following files/directories under build:

build dir

I think it is not right because there is no entry file to load all the stuffs...

Am I doing it correctly?

1 Answer 1

0

Change fallback to 'index.html' or the appropriate entry point name depending on your server.

As mentioned in the svelte Docs:

The fallback page is an HTML page created by SvelteKit from your page template (e.g. app.html) that loads your app and navigates to the correct route.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes. That is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.