-
Notifications
You must be signed in to change notification settings - Fork 71
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
Cannot build when composite: true
in tsconfig.json
#112
Comments
A minimal repo with reproduction will help a lot. @hassankhan |
This might be fixed in master now |
This happens when using |
I gave up trying to figure this out. For example, if I delete a dependency from my references, then I get the error The typescript API requires you to pass the references explicitly. I'm guessing that is the issue here |
This comment was marked as duplicate.
This comment was marked as duplicate.
@TomzBench @ezolenko I made a simple repo to reproduce the issue here: https://github.com/Domino9697/rollup-ts-issue-repro @atifsyedali and @TomzBench summed it up pretty much. Whenever we want to use references along with paths in the |
+1 I got the same issue, |
So it seems like per the repro above (thank you!), Since If |
composite: true
in tsconfig.json
OMG, so much work to get this to work. Going through the thread here shows that it's not working out of the box. Removing the You can make it pass by doing this: typescript({
tsconfig: "tsconfig.lib.json",
// https://github.com/ezolenko/rollup-plugin-typescript2/issues/112
tsconfigOverride: {
compilerOptions: { paths: {} },
},
}), |
Yes, as I mentioned above, Sounds like |
@agilgur5 sorry that is a lot of lingos that I'm not familiar. |
If you want to use |
Thanks for the info. |
Hmmmm that's a good suggestion as We could have a manual flag to turn off that warning I suppose, for when someone knows they're using it correctly. @jsgoupil could you file a separate issue for that so we can track it properly? |
I'm not super proficient in this space, I think it would be better if you create it. I literally inherited a project and used rollup for the first time today. I'm still learning around this. If I may suggest, maybe a well known variable, when you detect a paths in the configuration you display the warning that's silenceable either by the user, or a plug-in could come in and silence that warning as well? The paths + references seems to be the way to do monorepos. |
What happens and why it is wrong
This bug is occurring in a monorepo project managed with Yarn Workspaces. I've recently upgraded it to TypeScript 3 and was looking to take advantage of Project References. To do this, I set
composite: true
undercompilerOptions
intsconfig.json
for each subpackage. If I set it tofalse
, then everything works fine.Interestingly, builds using
tsc
work fine, only when using Rollup does this issue occur.Environment
Versions
rollup.config.js
I use a script to generate a Rollup configuration, the results of which are below:
Generated Rollup Config
tsconfig.json
Root
Project
package.json
plugin output with verbosity 3
Output
Similar issues
The text was updated successfully, but these errors were encountered: