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

fix: update svelte.config.js to properly handle TypeScript #4020

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LXIF
Copy link

@LXIF LXIF commented Nov 27, 2024

Description

TypeScript syntax inside the script tags of SvelteKit routes and components isn't properly handled without adding vitePreprocess, crashing the application.

With vitePreprocess, it works.

Fixes # (issue)

How Has This Been Tested?

I tried building an application from scratch with dfx new -> rust -> sveltekit, and it crashed when using syntax like type MyType = { propertyA: string; propertyB: ArrayBuffer }; inside a <script lang="ts"></script> tag in a svelte component or sveltekit page. Adding vitePreprocess solved it.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation. => Not necessary

TypeScript syntax inside the script tags of SvelteKit routes and components isn't properly handled without adding vitePreprocess, crashing the application.

With vitePreprocess, it works.
@LXIF LXIF requested a review from a team as a code owner November 27, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant