Svelte - Unexpected token (parse-error)
It seems like Parcel fails to parse this in a Svelte popup:
because of the
as const
part
Plsamo version: 0.60.3-lab.2
79 Replies
After removing it, it seems like this is an invalid syntax:
Removing
.plasmo/
doesn't solve the issue eitherTry verbose logging and see if it spits out any other info :d
I did try, that's how I found out that the aforementioned lines were problematic
At the bottom of the code pasting, is there a stack trace?
Only the problematic line
what happens if you move that component outside of popup directory?
Move the file and remove the references to it, or just move?
you prob need to replace the reference too yeah - tho in my project when I move files around they automatically replace the path for me
My WebStorm also did it, but the error is the same
I'm not entirely sure yeah, this is the TS in svelte territory, this error comes from the TS checker within Svelte
I mean visually there aren't issues
![](https://utfs.io/f/74d11882-31f6-4554-a28b-dd88b96a7782-1nq2cb.png)
š“ ERROR | Unexpected token (parse-error)Also this error could indicates hidden token btw afaik, this happens when you have a whitespace character somewhere that messed up the whole file
Maybe it has to do with the
tsconfig.json
How should it look like?It looks like this on the example: