TurboSvelteKitTypia Svelte Themes

Turbosveltekittypia

Description of the problem

Updates : now works, see config, had to add " include: ["../../**/*.ts+(|x)"],"

In this monorepo (Turborepo), within Vite-Sveltekit projects that do not use EsBuild in the vite config :

  • ✅ TS files from the same project work
  • ✅ JS file from the PNPM workspace work
  • ✅ On a regular Sveltekit install, TS files on the PNPM workspace work
  • BUT When I import a TS file on the PNPM workspace work I get this :
Parse failure: Unexpected token (3:26)
At file: /@fs/TurboSvelteKitTypia/packages/common/log.ts
Contents of line 3: export const messageLoaded: string =

If I remove TS syntax from the TS file it works again. It seems the file is imported as JS

The file that loads the other files is TurboSvelteKitTypia\apps\SvelteKitTS\src\routes+page.svelte

Tried :

Tried solutions proposed in :

Setup

pnpm add turbo --global
pnpm install

Working

pnpm workspace with typia & TS imports :

npx ts-node packages/typiaLib/run.ts

pnpm workspace lib that imports typia :

npx ts-node packages/typia-imported/run-import

sveltekit in workspace with typia lib that imports only JS files :

npx ts-node packages/typia-imported/run-import

Sveltekit with Js : working test

Dev

npx turbo run dev --filter=SvelteKitJS

Sveltekit with Ts : not working example

Dev

npx turbo run dev --filter=SvelteKitTS

Build

npx turbo run build --filter=SvelteKitTS

Other Not working

sveltekit in workspace with typia lib that imports TS files :

npx ts-node packages/typia-imported/run-import

Top categories

Loading Svelte Themes