-
Notifications
You must be signed in to change notification settings - Fork 492
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 parser uses lang only from first script tag #933
Comments
milahu
added a commit
to milahu/mitosis
that referenced
this issue
Nov 30, 2022
milahu
added a commit
to milahu/mitosis
that referenced
this issue
Dec 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
currently the svelte parser fails to parse typescript
when the first script tag is javascript
parsers/svelte/index.js:98:
const ast = parse(processedString.code);
processedString.code has unprocessed typescript in
<script lang="ts">
mitosis/packages/core/src/parsers/svelte/index.ts
Lines 52 to 73 in 8eea6e0
blame isTypeScriptComponent
mitosis/packages/core/src/parsers/svelte/typescript/index.ts
Lines 10 to 15 in 8eea6e0
const match = regex.exec(string_);
gets only the first matchfix
mitosis/packages/core/src/parsers/svelte/typescript/index.ts
ideally, the svelte parser should use my svelte.config.js
The text was updated successfully, but these errors were encountered: