Closed Kilerd closed 3 years ago
The typescript plugin in the rollup config should transform that syntax.
It seems to work when I do this:
npx vercel-sapper tstest
cd tstest
node scripts/setupTypeScript.js
# remove successkid import
# add `console.log(dev?.test)` to server.ts
vercel
my mistake, I just forgot to add lang="ts"
in the svelte component. it works after adding the lang tag.
I use typescript in my sapper project, and of cause I use some typescript syntax, like question mark syntax.
after deploying to vercel, the vercel-sapper function raise 502 because of the question mark syntax. the log is
it seems that typescript code is not translated to javascript, so the vercel-sapper function cannot recognize my typescript code ?