-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
[Question/Feature Request] Specify different tsconfigs for different instances. #926
Comments
You can use the
But you actually don't want two different ts-loader instances. You really want project references. Project references don't work great with ts-loader right now, but they will soon. |
Extending my example such that there is a universal set of files, a web set, and a node set, will project reference support (once it's done), bundle the built universal js into both the node and web bundles? |
Project references itself doesn't bundle anything—that's webpack's job. You'd have two root projects: node and web, each of which reference a third project: the shared code. Running |
Makes sense. So then if I use webpack for both the node and web sets, I would get 2 bundles, both containing copies of the transpiled shared code. |
Yeah, I guess so. I wasn’t thinking about using Webpack for node, but yeah, that would work. |
We can specify different instances of
ts-loader
like this:but is there a way that I can have each of these instances use a different tsconfig? Perhaps one set of files is allowed to have
dom
related types and another set of files is meant to be universal and so should not have anydom
types.In my use case files from both sets need to end up in the final 1 bundle.
The text was updated successfully, but these errors were encountered: