diff --git a/documentation/faq/70-packages.md b/documentation/faq/70-packages.md index c26c4369aa0d..b4da6f2dd404 100644 --- a/documentation/faq/70-packages.md +++ b/documentation/faq/70-packages.md @@ -12,4 +12,6 @@ Old beta versions of the SvelteKit template included the configuration value `no The second most commonly-encountered issue is having a Svelte component that imports a CommonJS library. In this case, you should try to work with the library authors to distribute an ESM version of the dependency. However, in the meantime, you can workaround this issue by adding the dependency to `vite.optimizeDeps.include` in `svelte.config.js`. +Also, some Svelte libraries doesn't work nicely with Vite's pre-bundling process, do check out `@sveltejs/vite-plugin-svelte`'s docs on its current [limitation and workaround](https://github.com/sveltejs/vite-plugin-svelte/tree/main/packages/vite-plugin-svelte#importing-third-party-svelte-libraries). + If you are still encountering issues we recommend searching both [the Vite issue tracker](https://github.com/vitejs/vite/issues) and the issue tracker of the library in question. Sometimes issues can be worked around by fiddling with the [`optimizeDeps`](https://vitejs.dev/config/#dep-optimization-options) or [`ssr`](https://vitejs.dev/config/#ssr-options) config values.