---
title: "Comment by Lars Rye Jeppesen on \"Setting up a monorepo with Vite, Typescript, and pnpm workspaces\" | Hashnode"
description: "Hi, how do you solve the issue with compilation? tsc for example ,cannot use the shared library source code, it requires a compile shared library. Once you star"
url: "https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e/comment/642bd15339fb0f053a10629e"
---

[Discussion](https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e)

Comment [Setting up a monorepo with Vite, Typescript, and pnpm workspaces](https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e)

[Lars Rye Jeppesen](https://hashnode.com/@spock123)

[Apr 4, 2023](https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e/comment/642bd15339fb0f053a10629e)

Hi, how do you solve the issue with compilation? tsc for example ,cannot use the shared library source code, it requires a compile shared library.

Once you start using the build version of shared libraries, then you run into the issue of having to compile every time there is a change in a library - and so does every other developer using the same monorepo.

Is there a way to let the typescript compiler use the src from shared?

[Vedansh Mehra](https://hashnode.com/@imvedanshmehra)

[Apr 6, 2023](https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e/comment/642bd15339fb0f053a10629e#reply-642eac46d5c9e428d8ee1a00)

Hi, thank you for taking the time to read this article ❤️

TBH, I have not run into this situation by myself so far but I see your point, I have read that a few packages like ttypescript and ts-node can help us do that but I am yet to explore that.

Maybe I'll write a new article on this very soon once I explore more about it.

[Lars Rye Jeppesen](https://hashnode.com/@spock123)

[Apr 6, 2023](https://hashnode.com/posts/setting-up-a-monorepo-with-vite-typescript-and-pnpm-workspaces/63ce0bd684fad71a166baa6e/comment/642bd15339fb0f053a10629e#reply-642f393a7a31ea30695e4a20)

[Vedansh Mehra](https://hashnode.com/@imvedanshmehra)

For smaller libraries, I found that esbuild-based bundlers like tsup are great for this (that is what I ended up using anyways). cheers
