Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Are Svelte and SvelteKit static adapter the same?

$
0
0

I have two projects here:

  1. Created using npm create vite app-with-svelte -- -t svelte-ts
  2. Created using npm create svelte app-with-sveltekit (Skeleton project)

Then, I use the static adapter with it, following this doc. Eventually, svelte.config.js:

 import adapter from "@sveltejs/adapter-static"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; const config = {     preprocess: vitePreprocess(),     kit: {         adapter: adapter({         pages: "build",         assets: "build",         fallback: undefined,         precompress: false,         strict: true,         }),     }, }; export default config;

src/routes/+layout.ts:

export const prerender = true;

Both projects are aimed to host as static files. Is any one of these better than the other?

I created a project using SvelteKit static adapter with Neutralino. From the middle of the way, I got stuck with Compatibility with SvelteKit (Neutralino issue), forcing me to use Svelte. So I searched for migrating SvelteKit to Svelte, found a reddit tweet:

There's no need to migrate away from kit. Look up @sveltejs/adapter-static. It should solve your issue

After npm run build, are Svelte and SvelteKit static adapter the same? If so, which one should I use?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>