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

Custom tsConfig path #18

Open
ondrej-111 opened this issue Nov 15, 2022 · 1 comment
Open

Custom tsConfig path #18

ondrej-111 opened this issue Nov 15, 2022 · 1 comment

Comments

@ondrej-111
Copy link

Please provide the option to specify a custom tsConfig, something like this:

[
      'babel-plugin-tsconfig-paths-module-resolver',
      {
        "tsConfig": "apps/functions/tsconfig.app.json",
      }
    ]
@bsantare
Copy link

bsantare commented Feb 3, 2023

You can work around this limitation by setting an environment variable pointing to the required tsconfig file before this plugin is initialized and before calling createResolvePath(). If you have a babel.config.js you can do something like:

process.env.TS_NODE_PROJECT = path.join(<someRootPath>, 'tsconfig.base.json');

before exporting the plugin configuration.

https://github.com/dividab/tsconfig-paths#config-loading-process

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

2 participants