Skip to content
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

Support for sveltekit #18

Closed
ivanhofer opened this issue Mar 26, 2021 · 3 comments
Closed

Support for sveltekit #18

ivanhofer opened this issue Mar 26, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@ivanhofer
Copy link
Owner

Because of vitejs/vite#2579 it is currently not possible to use typesafe-i18n inside sveltekit applications.

A workaround is:

  • disabling ssr inside svelte.config.cjs
  • manually change export{u as getI18nSvelteStore}; to export const getI18nSvelteStore = u; inside node_modules\typesafe-i18n\adapters\adapter-svelte.js
@ivanhofer ivanhofer added the enhancement New feature or request label May 27, 2021
@ivanhofer
Copy link
Owner Author

was fixed with version 2.31.0

@Evertt
Copy link

Evertt commented Oct 6, 2021

Sorry, but how does one get the generator to work with Sveltekit? I see there's a page about Svelte / Sveltekit / Sapper, but there's no mention of Vite in there and I don't know how to configure Vite to run the generator...

@ivanhofer
Copy link
Owner Author

Hi @Evertt,
please take a look at this section: https://github.com/ivanhofer/typesafe-i18n#node-process
I will need to update the svelte-Readme, since with svelte-kit, the node-process makes more sense than the rollup-plugin. Thanks for pointing it out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants