-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[docs] add docs for vite-plugin-svelte #2665
Conversation
|
It's passed to |
Above this list, it says that the values below are the defaults. Is this noop function the default value for |
Imho kit docs should not include/duplicate documentation for specific vite-plugin-svelte options. The onwarn option is going to be moved to vitePlugin.onwarn once sveltejs/rfcs#59 lands Maybe a generic note+link to plugin docs helps? That would avoid having to maintain docs in 2 locations |
I think |
when and if onwarn becomes a standardized top level config key it should be documented properly in sveltejs/config and linked here. Currently it is an implementation detail of vite-plugin-svelte (and rollup-plugin-svelte). I don't think we should add the actual option here, unless we also want to start adding all other options too, and some more vite ones while we're at it? Why exactly is this needed? Did we recieve tons of questions about warnings and vite-plugin-svelte docs are not clear enough? |
I saw a quite lot of question about silencing warnings in Discord. |
Please give examples where ignoring the warning is the correct solution. Most of the time warnings do identify actual problems that should be fixed in the code that caused them instead of just ignoring. If there are common "false positives" we should try to avoid issuing that warning altogether instead of leaving it for the user to clean up. |
I never said it's correct... I said it's what is often asked for in Discord. I myself never used onwarn setting... |
Yeah, I agree with dominik that adding just FWIW I had usecases for |
I'm still hesitant to mentioning onwarn, the discussion above indicates it could be abused by novice users to ignore warnings to their own disadvantage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to a generic message as discussed in the Conversation above
onwarn
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is getting too involved for such a straightforward change, we don't want to overwhelm newcomers by having too much information in the face when reading through the docs.
A comment on the config example explaining that options from the plugin can also be passed should be enough, maybe update docs on plugin repo to have an example usage with SK if needed, I left a suggestion to that comment, I'll leave the plugin docs to @dominikg and @bluwy
Co-authored-by: Ignatius Bagus <ignatius.mbs@gmail.com>
Before submitting the PR, please make sure you do the following
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0