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

Svelte 5: <script module> - Cannot use JSX unless the '--jsx' flag is provided. js(17004) #13279

Closed
Fd929c2CE5fA opened this issue Sep 17, 2024 · 1 comment

Comments

@Fd929c2CE5fA
Copy link

Fd929c2CE5fA commented Sep 17, 2024

Describe the bug

See the screen recording for errors:

reproduction-s9v5sz.mp4

npm create vite@latest
svelte + javascript

<script module>

	export function abc(a, b) {
		if (a > b) {
			return "abc";
		}
		return "abcdefg";
	}

</script>

<script>
	
</script>

Related Issues/PR:

Reproduction

https://github.com/Fd929c2CE5fA/reproduction-s9v5sz

Logs

No response

System Info

"@sveltejs/vite-plugin-svelte": "3.1.2",
"svelte": "5.0.0-next.247",
"vite": "5.4.6"

Severity

blocking an upgrade

@Fd929c2CE5fA
Copy link
Author

The issue was solved after updating the "Svelte for VS Code" extension.

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

No branches or pull requests

1 participant