Open kylemh opened 4 years ago
This is a follow-up from https://github.com/jaredpalmer/tsdx/pull/646#issuecomment-609078762
how files/folders are chosen for the build step in
tsdx
.
There's nothing special, the source code just adds some defaults and passes to rpts2: https://github.com/jaredpalmer/tsdx/blob/f58de19871a03c15a84bb0da1ba97b374e846c2a/src/createRollupConfig.ts#L146-L177
I'd need to check your repo and see how tsc
was working, but if this is really a bug, it'd be upstream in rpts2 since TSDX doesn't do anything fancy. Afaik in the rpts2 source code (I've contributed a small bit to fix issues here), it doesn't do much with include
/ exclude
either and passes that to the TS API.
Which is why I'm surprised if it doesn't handle exactly like tsc
Yeah. I was surprised as well. Sure enough running TSC won’t compile storybook files, but TSDX build will.
Current Behavior
When using a monorepo, I'd like to minify the amount
tsconfig
I am defining per package. To that end, the value of theexclude
property at the root config is being ignored when building TSDX packages in their own subdirectories.You can test for yourself thru this example project by doing:
and noticing that storybook files are compiled, despite being ignored from the root config extended by the package's config.
It seems like running
tsc
with my tsconfigs works as expected, but the build step continues to compile things I am excluding.Expected behavior
In the example repo, stories are not compiled.
Suggested solution(s)
Unsure... I'd love to resolve this myself. @agilgur5 has DMs disabled on Twitter, but I was curious if anybody would be down to pair for a short chat about how files/folders are chosen for the build step in
tsdx
.Additional context
Similar issue resolved: https://github.com/jaredpalmer/tsdx/issues/61
Your environment