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

Figure out Wasp's tsconfig story after Wasp 0.12.0 #1827

Open
sodic opened this issue Feb 29, 2024 · 1 comment
Open

Figure out Wasp's tsconfig story after Wasp 0.12.0 #1827

sodic opened this issue Feb 29, 2024 · 1 comment
Labels
enhancement New feature or request post-0.12.0

Comments

@sodic
Copy link
Contributor

sodic commented Feb 29, 2024

During the restructuring in Wasp 0.12.0, we had plans to optimize how Wasp uses different tsconfig.json files.

Wasp 0.12.0 ended up being a compromise between ease of implementation and DX. Now that 0.12.0 is out, we can focus on optimizing how Wasp uses and interprets tsconfig files.

Here's the original issues for context:

Other relevant context:

TSconfig-related issues that are still relevant after 0.12.0:

@sodic
Copy link
Contributor Author

sodic commented May 27, 2024

Project references may help us have users' code compiled with their own tsconfig.json.:

  • SDK: SDK includes a full copy of the user's code under node_modules/wasp/ext-src. We can also copy the user's tsconfig.json into node_modules/wasp/ext-src and make mode_modules/wasp/tsconfig.json point to it using a project reference.
    Possible problem: If parts of the config only work in the file's original location, we'll have a problem after copying it.
  • Framework: Framework imports some components from ../../../src directly. We can use a project reference to include the user's tsconfig.json (which should already be applied to everything in src).

Reference: Effective Typescript, 2nd edition, item 78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request post-0.12.0
Projects
None yet
Development

No branches or pull requests

1 participant