Closed JonasBa closed 4 years ago
Please don't remove issue templates, they are there for a reason.
Running
tsdx build
emits only direct children of thesrc
folder and only emits .d.ts declarations for the rest.
Neither of those is exactly accurate.
TSDX only builds src/index.ts
(or variants of it, like .tsx
, .js
, .jsx
), not "only direct children". Its tree of imports is bundled into its single JS output file with Rollup.
Type declarations, i.e. .d.ts
files, are emitted based on whatever your tsconfig
include
has, which should be just src
and types
.
the dist folder seems to contain only type declarations for the queue and not the actual implementation
Yes, it has been tree-shaken and bundled into your one JS file. Check the contents of your bundled file.
I'm simplifying by saying "one JS file output", there is at least one per format (ESM, CJS, etc), sometimes multiple if dev/prod variants are possible in the given format. These are all bundles of the same thing, just different formats.
Running
tsdx build
emits only direct children of thesrc
folder and only emits .d.ts declarations for the rest.My dir structure like below where
src/index.ts
imports some queue implementation fromqueue/index.ts
What happens is that after running
tsdx build
, the dist folder seems to contain only type declarations for the queue and not the actual implementation like so:I've tried modifying the
include
property of tsconfig.json to useinclude: ["src/**/*"]
but that didn't result in the implementation being emitted in the build.P.S: sorry if this is a newb question, it's my first time using tsdx 😅