You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If tsconfig.json does not contain compilerOptions and instead references other tsconfigs, svelte-preprocess fails to get the actual TS configs. In particular, it results in the fallbacked target ES2015, where object resting isn't supported yet (it was added in ES2018), and the following component fails to compile:
sounds like something that'll be fixed in svelte-preprocess? is there a workaround packages can apply so users don't encounter this error? asking for janosh/svelte-multiselect#305
I looked into this. I thought that the tsconfig should be just extended with referenced ones, but after reading the docs, I understood that references allows running TS on files (subprojects) with independent tsconfigs simultaneously and in within a single process. That means that svelte-preprocess should find and apply tsconfig matching the current file.
So, maybe for now it would be easier to just emit a warning that svelte-preprocess failed to auto-resolve tsconfig or the resolved tsconfig doesn't contain compilerOptions, so the user should manually specify path to it.
From sveltejs/svelte#15782
If
tsconfig.json
does not containcompilerOptions
and instead references other tsconfigs, svelte-preprocess fails to get the actual TS configs. In particular, it results in the fallbacked target ES2015, where object resting isn't supported yet (it was added in ES2018), and the following component fails to compile:To Reproduce
npm create vite
, select Svelte and Typescript.npm i svelte-preprocess
and apply itvite.config.ts
Expected behavior
The component is successfully compiled.
Information about your project:
svelte-preprocess
version 6.0.3The text was updated successfully, but these errors were encountered: