-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Error parsing svelte:head #100
Comments
Aah, so the stacktrace points to this file: https://github.com/AlecAivazis/houdini/blob/3b05b9b032bf66471975e9d1455f586ee07a141d/packages/houdini-common/src/parse.ts. I see that houdini's finding all |
Reference: sveltejs/svelte#335 |
houdini generate
I guess I need to know why Houdini uses its own parser. Is there no way of sharing a parser with Svelte, or at least doing it in the same way? |
FWIW, it's not specific to
It's just that we should ignore any script tag which is nested in a HTML element. |
Hey @georgecrawford - thanks for opening this. I tried at first to use the native svelte parser but because it only parses typescript through its plugins, i was running into a lot of hair pulling to get things wired up correctly. If we can find a way to use svelte's parser, i would prefer it. I think a quick solution (maybe even the right one?) is to only consider |
I'm struggling to get
houdini generate
to work on my codebase. Hitting lots of errors without any clue which file they come from. I'm not sure if the problem is from svelte or houdini. For example:route.svelte
output:
Putting in some logging in the top stacktrace location, I see that it's trying to run
JSON.parse('{scriptPath}')
, which was never going to work.This same code works fine in Sveltekit, so I don't know where things have gone wrong.
The text was updated successfully, but these errors were encountered: