Skip to content

What causes "some" to be undefined in vite-plugin-sveltekit-compile? #11429

Answered by HriGunov
cascading-jox asked this question in Q&A
Discussion options

You must be logged in to vote

I was had the same issue a while back, subscribed to the discussion. A few months ago I found the solution, but forgot to share.

You have to use the svelte plugin when you want to get a js bundle.

- import { sveltekit } from '@sveltejs/kit/vite';
+ import { svelte } from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';

export default defineConfig({
        ...
	plugins: [
-	    sveltekit()
+            svelte()
	],
	...
});

I use 2 separate vite configs. The first one (uses thesveltekit plugin), for messing around and developing custom components. The other one (uses the svelte plugin) bundles everything in to a single bundles, I run this on a each component separate…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@cascading-jox
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by cascading-jox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants