Broken build with `tsdx build --format es`
See original GitHub issueCurrent Behavior
In an attempt to speed up my builds (and not need the other formats), I attempted to only build for es
by changing the build
script in package.json
to tsdx build --format es
but in doing so, it fails with
(node:89396) UnhandledPromiseRejectionWarning: Error: You must supply an options object to rollup
I thought this might be fixed by this commit in 0.5.10 but even on 0.5.11
it still shows the issue (I did a fresh project with npx tsdx create tsdx-test
to verify it wasn’t anything in my project specifically).
Expected behavior
To be able to only build a specific format (and possibly any other way so to optimize). My builds jumped from less than 2 minutes for the full pipeline (not just npm run build
) to between 7-8 minutes after changing to tsdx (along with migrating to 99% typescript from ~30% prior). I could see having more Typescript code causing it to be a little slower, but not to this magnitude. I was only performing 1 build before, so I’m hoping going back to that will improve my tsdx
build times.
Suggested solution(s)
I thought this commit was the fix, but not sure where the issue is now.
Your environment
Software | Version(s) |
---|---|
TSDX | 0.5.11 |
TypeScript | 3.1.6 |
Browser | Chrome |
npm | 6.8.0 |
Operating System | Mac |
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
haha enjoy your vacation
The root issue appears to be if you exclude
cjs
from the formats, sotsdx build --format cjs,es
works, but not justtsdx build --format es
due toinputOptions
being null here.Excluding
umd
using--format=cjs,es
has dropped a minute or so off my builds, which helps.