Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure sst-env.d.ts generation #1093

Open
oscartbeaumont opened this issue Sep 18, 2024 · 1 comment
Open

Configure sst-env.d.ts generation #1093

oscartbeaumont opened this issue Sep 18, 2024 · 1 comment
Assignees

Comments

@oscartbeaumont
Copy link

oscartbeaumont commented Sep 18, 2024

It would be great to be able to disable the generation of sst-env.d.ts for a specific package or a group of packages mostly likely by having a configurable exclude pattern.

For example my monorepo at it's root has:

  • sst.config.ts
  • packages/*
  • apps/*

By the current SST logic everything in packages/* gets given an sst-env.d.ts even though I would rather it not have one.

In practice I don't want anything in packages directly touching the infrastructure as they are designed to be self-contained packages such as what would potentially be publishable to npm. Not having the types helps to force separatation and cleans up the Git diff everytime a resource with links is changed in SST.

Broken out from my comment in #1017.

@paolostyle
Copy link
Contributor

We have the same problem. What would be even better if SST was somehow able to generate sst-env.d.ts tailored for each package (I guess based on handler paths and their links? I can imagine it's quite tricky to do it right) - it's pretty annoying that every change in SST config results in like 20 changed files even though it realistically only affects one of packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants