Skip to content

How to ass cssHash i see warning : [vite-plugin-svelte] The following Svelte compilerOptions are controlled by vite-plugin-svelte and essential to its functionality #13855

Discussion options

You must be logged in to vote

It looks like you are trying to customize the cssHash in a SvelteKit project, but you are encountering some issues. Let me try to help you with that.

Firstly, the warning you are seeing about cssHash is likely because you are trying to override it in the wrong place. The cssHash should be set in the compilerOptions under kit in your svelte.config.js, not at the top level of compilerOptions. Here's how you can update your svelte.config.js:

import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';

const config = {
    // Consult https://kit.svelte.dev/docs/integrations#preprocessors
    // for more information about preprocessors
    preprocess: [vi…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@debuggerpk
Comment options

Answer selected by good-dev-student
Comment options

You must be logged in to vote
1 reply
@Randall3475
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants