Newbie question here: what would folks recommend t...
# typescript
s
Newbie question here: what would folks recommend to help keep from littering my hard drive with multiple 200MB
node_modules
directories?
l
Yarn workspaces. Or you can do the same thing yourself by having multiple projects in their own directories under a single set of tsconfig.json and package.json.
👍 1
Depending on what you're doing with containers and so forth, you may need a top-level index.ts that imports the project you're working on. And there's a known issue with this setup when using inline code as your AWS lambda or similar. You may need to symbolic link your node_modules and package.json until that's sorted. Onesec I'll get the issue link.
There's a comment in there that shows the directory structure you need. Just remove
yarn.lock
from the picture and it should work for you.
s
Thanks! I'm using the "multiple projects under a single directory" approach now, which works, but something more flexible would be great. I'll look into Yarn workspaces, thanks!