New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to disable warnings like css-unused-selector #2253
Comments
If I'm not mistaken it should be enough to place that |
you should be able to define a custom warning handler in svelte.config.js. it works similar to rollup-plugin-svelte |
Thanks @dominikg , @dummdidumm I didn’t catch exactly where I can put this onwarn in the svelte.config.js. In paths: In the config.kit.vite it's ok, no errors, but nothing works also:
|
it should be in the root, a sibling of |
Looks like kit defines custom validation for the svelte config, which is blocking usages of |
@dominikg Full svelte.config.js:
|
Bluwy already posted the reason for this. sveltekit's config validation currently doesn't allow extra options to be set. So right now this is not supported. |
is it not possible to change rollup config through |
The option should be better documented on vite-plugin-svelte and we need to figure out how multiple projects in the svelte universe share the same @Mlocik97 that option doesn't work on dev obviously and also not on build as vite-plugin-svelte used its own custom logging instead of |
Config properties defined at the top-level should not throw anymore in |
Was the ability to pass I tried putting it in EDIT: I also tried passing it to the SK vite plugin, but according to the code - it's impossible to pass options to |
Describe the problem
With Rollup we can use onwarn event, modify it to exclude specific warnings. But how to do it in SvelteKit?
Describe the proposed solution
Option in svelte.config.js to ignore specific warnings.
Or (best): allow comments like "svelte-ignore css-unused-selector" inside corresponding style files/blocks, not only at the html markup level.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: