sveltejs / svelte-preprocess

A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
MIT License
1.73k stars 147 forks source link

No longer works with Typescript 5.0 #586

Closed CrendKing closed 1 year ago

CrendKing commented 1 year ago

Describe the bug I updated dependency of Typescript from 4.9.5 to 5.0.2 and pnpm tauri build starts to fail in svelte-preprocess.

Logs N/A

To Reproduce To help us help you, if you've found a bug please consider the following:

Expected behavior The app is built successfully.

Stacktraces

Stack trace ``` > tauri-app@0.0.0 tauri D:\tauri-app > tauri "build" Running beforeBuildCommand `pnpm build` > tauri-app@0.0.0 build D:\tauri-app > vite build vite v4.2.0 building for production... transforming (1) index.htmlerror TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'verbatimModuleSyntax' instead. error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'verbatimModuleSyntax' instead. ✓ 3 modules transformed. [vite-plugin-svelte] dom compile done. package files time avg ✓ built in 298ms [vite-plugin-svelte] Error while preprocessing D:/tauri-app/src/App.svelte - [svelte-preprocess] Encountered type error file: D:/tauri-app/src/App.svelte error during build: Error: Error while preprocessing D:/tauri-app/src/App.svelte - [svelte-preprocess] Encountered type error at throwError (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\modules\errors.js:5:11) at throwTypescriptError (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\modules\errors.js:9:28) at transpileTs (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:177:47) at simpleTranspiler (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:268:60) at transformer (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\transformers\typescript.js:311:11) at transform (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:47:12) at async D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:118:29 at async script (D:\tauri-app\node_modules\.pnpm\svelte-preprocess@5.0.2_bar3e6maa3kocq65ftghewjow4\node_modules\svelte-preprocess\dist\autoProcess.js:148:33) at async process_single_tag (file:///D:/tauri-app/node_modules/.pnpm/svelte@3.57.0/node_modules/svelte/compiler.mjs:47843:27) at async Promise.all (index 0)  ELIFECYCLE  Command failed with exit code 1. Error beforeBuildCommand `pnpm build` failed with exit code 1  ELIFECYCLE  Command failed with exit code 1. ```

Information about your project: