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

feat: expose tsconfigPath to AppConfig #6301

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marwan38
Copy link

@marwan38 marwan38 commented May 4, 2023

I can see this likely being used by others, no reason not to expose it AFAIK.

Our current use-case is that there are some properties in the tsconfig.json that I don't want to be available to the remix build. We have a mono-repo and we use the paths property in tsconfig to provide typings across all packages but at build time we expect remix to resolve the module in it's compiled form which is available through the node module resolution (symlinked inside node_modules as all other packages). This is caused by esbuild resolving paths through the tsconfig.

Here's a bit of code to demonstrate why I'd like this change:

Main tsconfig is used for IDE type resolution

// tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@internal-pkg/*": ["../internal-pkg/src/*"]
    }
  }
}

Whilst tsconfig.build is used strictly for building the application. This config ensures that the bundler resolves @internal-pkg/* from node_modules or whatever the module resolution type is.

// tsconfig.build.json
{
  "compilerOptions": {
    "paths": {}
  }
}

@changeset-bot
Copy link

changeset-bot bot commented May 4, 2023

⚠️ No Changeset found

Latest commit: 309e75a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 4, 2023

Hi @marwan38,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 4, 2023

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@michael-golfi
Copy link

Is there anything else required for getting this merged?

@marwan38
Copy link
Author

marwan38 commented Jun 6, 2023

@michael-golfi Not from my end. Let me fix the cla conflict

@marwan38 marwan38 force-pushed the feature/tsconfigPath-remix-config branch from 2d03365 to 94f6a0b Compare June 6, 2023 20:42
@marwan38
Copy link
Author

marwan38 commented Jun 6, 2023

@michael-golfi fixed

@michael-golfi
Copy link

Thanks @marwan38, I need this to satisfy some VSCode lints but also have remix build successfully

@LucilleH
Copy link

Is there anything pending on this still? Would really appreciate this going in!

@marwan38
Copy link
Author

Is there anything pending on this still? Would really appreciate this going in!

Looks like I need to sync up the branch. I think it was up for a while anyways without movement. I'll fix it up sometime today.

@LucilleH
Copy link

LucilleH commented Nov 6, 2023

@marwan38 friendly ping 😃 - this would really help us unblock some development pain 🙏

@marwan38 marwan38 force-pushed the feature/tsconfigPath-remix-config branch 2 times, most recently from 28baa1b to 05cc232 Compare November 6, 2023 20:29
@marwan38
Copy link
Author

marwan38 commented Nov 6, 2023

@LucilleH Haha sorry! I totally forget. I have it patched at work so I never bothered too much to keep up with it. I highly recommend you do the same while waiting for this to get merged!

I've rebased the PR! Hopefully the team gets onto it soon :)

@marwan38 marwan38 force-pushed the feature/tsconfigPath-remix-config branch from 05cc232 to 67cddaf Compare February 4, 2024 21:52
@marwan38
Copy link
Author

marwan38 commented Feb 4, 2024

Sorry.. I did make the fix but I believe I forgot to push it 😮‍💨 Hopefully this times the charm, assuming CI passes🤞

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

Successfully merging this pull request may close these issues.

None yet

5 participants