This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Description
Describe the bug
Build (and VSCode check) fails when TS is used in <script>. You can see the unexpected token error on the screenshot. Build fails with the same unexpected token error. Not quite sure why. I followed all the recommendations from svelte-preprocess docs.

Logs
Please include browser console and server logs around the time this bug occurred.
To Reproduce
- Create a fresh sapper project with
degit
- Follow the instructions from here
- Add
lang="typescript" to any <script>.
- Inside that script, add
let a: number = 1
tsconfig.json:
{
"include": ["src/**/*"],
"exclude": ["node_modules/*"],
"compilerOptions": {
"target": "es2017",
"types": ["svelte", "node"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"noEmit": true,
"lib": ["dom.iterable", "es5", "es6", "esnext", "dom"],
"downlevelIteration": true
}
}
Expected behavior
Build doesn't fail. VSCode shows no errors.
Information about your Sapper Installation:
- WSL2 Ubuntu 18.04 (Windows 10)
"sapper": "^0.27.0",
"svelte": "^3.0.0",
Severity
Moderate