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

How to use current directory tsconfig.json? #865

Closed
VictorQueiroz opened this issue Oct 31, 2018 · 6 comments
Closed

How to use current directory tsconfig.json? #865

VictorQueiroz opened this issue Oct 31, 2018 · 6 comments
Labels

Comments

@VictorQueiroz
Copy link

VictorQueiroz commented Oct 31, 2018

I currently have two folders src and sw (which would be a different environment, in this case a service worker) and I want to use different tsconfig.json files for each folder. Although ts-loader picks one tsconfig.json file, ignore the other and then use the picked one to compile all files of both directories. How can I fix that behavior? I have a different tsconfig.json file inside each of these projects.

Sorry if this is a duplicate, I already searched a few issues in this repository but none of them fixed my problem.

@johnnyreilly
Copy link
Member

I suspect you want to run 2 different instances of ts-loader. Use this: https://github.com/TypeStrong/ts-loader/blob/master/README.md#instance-string

Usage looks something like this: https://github.com/TypeStrong/ts-loader/blob/master/test/comparison-tests/instance/webpack.config.js

(Above file is a test file and so has some differences from a typical config)

@stale
Copy link

stale bot commented Jan 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 19, 2019
@stale
Copy link

stale bot commented Jan 26, 2019

Closing as stale. Please reopen if you'd like to work on this further.

@stale stale bot closed this as completed Jan 26, 2019
@ozyman42
Copy link

Related to #926. @johnnyreilly you pointed out that @VictorQueiroz should use 2 different instances, but he also asked how we can use a different tsconfig for each instance.

@johnnyreilly
Copy link
Member

@ozyman42
Copy link

Yes thanks.
I guess I had a misunderstanding about webpack. It seems like this only allows me to provide rules for the various entry files. How would I use different tsconfigs for the transitive dependency files?

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

No branches or pull requests

3 participants