This message was deleted.
# general
s
This message was deleted.
w
Copy code
├── config
│   ├── base.template.yaml
│   └── localstack.template.yaml
├── lib
│   ├── components
│   │   └── aws
│   │       └── backend
│   │           └── S3KmsBackend.ts
│   └── utils
│       ├── Stack.ts
│       └── registerAutoTags.ts
├── stacks
│   └── stack-a
│       ├── Pulumi.yaml
│       ├── index.ts
│       └── package.json
│       └── tsconfig.json
│   └── stack-b
│       ├── Pulumi.yaml
│       ├── index.ts
│       └── package.json
│       └── tsconfig.json
├── tests
│   ├── docker-compose.e2e.yml
│   ├── e2e
│   │   └── e2e.test.ts
│   ├── tsconfig.json
│   ├── unit
│   │   └── lib
│   │       ├── components
│   │       │   └── aws
│   │       │       └── backend
│   │       │           └── S3KmsBackend.test.ts
│   │       └── utils
│   │           └── Stack.test.ts
│   └── utils
│       ├── captureConsole.ts
│       ├── env.ts
│       └── s3Helper.ts
├── tsconfig.json
├── package.json
├── requirements.txt
├── Pulumi.yaml
├── README.md
l
Yes, but not with the default TS config. The solution depends on how you want to make it work. I use Yarn workspaces and ESM; the workspaces work automatically, I need to add this to get ESM working:
Copy code
runtime:
  name: nodejs
  options:
    nodeargs: "--loader ts-node/esm --no-warnings"
You can also get tsconfig's paths working. I've had it working in the past, but since we switched to Yarn2, I've migrated everything to use that, and the tsconfig settings aren't needed for that.
If I recall correctly, I figured out how to get paths working by first doing it without Pulumi, then adding Pulumi. There were probably nodeargs involved, but I don't remember, sorry.
Oh I just remembered that with Yarn2, if you want to use workspaces and Pulumi together, you do need to set
nodeLinker: node-modules
in your .yarnrc.yml
w
Nice, okay yeah I think I'm going to go for the yarn2 migration as well, been a while since I've dabbled in the TS / JS ecosystem. Thanks for the tips, this is promising!