-
I bit the bullet and learned Typescript and love tsdx so far. There is however a part of my workflow I am struggling with: These are included in my .ts source tree in many files as follows:
The package (standalone not React based) builds fine with However, when I go to test the build bundle in /dist using the node REPL I get:
I was expected all dependencies to be pulled into the final bundle; Is there some rollup config "tweak" needed under the covers to pull this .js file in? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's hard to tell what the issue is without a repro or seeing the built output. TSDX does support JS and I personally put in several PRs for this and there are tests for it too.
I suspect the issue may be that in TS one does not use file extensions, so your import maybe isn't getting recognized as result. I would remove the |
Beta Was this translation helpful? Give feedback.
It's hard to tell what the issue is without a repro or seeing the built output.
TSDX does support JS and I personally put in several PRs for this and there are tests for it too.
I suspect the issue may be that in TS one does not use file extensions, so your import maybe isn't getting recognized as result. I would remove the
.js
from your import and make sure you've setallowJs
totrue
in yourtsconfig.json