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
little-cartoon-10569
06/16/2020, 11:10 PM
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
salmon-account-74572
06/22/2020, 4:06 PM
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!
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.