Skip to content
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

tslib should be put in dependencies #412

Closed
zhaoyao91 opened this issue Jan 4, 2020 · 2 comments · Fixed by #415
Closed

tslib should be put in dependencies #412

zhaoyao91 opened this issue Jan 4, 2020 · 2 comments · Fixed by #415

Comments

@zhaoyao91
Copy link

Current Behavior

Currently the tslib is put in devDependencies, but as importHelpers is true in tsconfig.json, the build result will only require tslib. In some build context, such as in electron, the tslib will not be packaged since it is not in dependencies.

Suggested solution(s)

Two options:

  • importHelpers set to false
  • or, add tslib as dependencies instead of dev dependencies

Your environment

Software Version(s)
TSDX 0.12.0
@jaredpalmer

This comment has been minimized.

@agilgur5
Copy link
Collaborator

This was a regression caused by #130 and fixed in #415, related to #413

TSDX transpiles TS -> ESNext, then ESNext -> preset-env, so Babel's helper functions get generated instead of TS ones.

There's still some debate about whether those should import from @babel/runtime (instead of being duplicated between libraries) by default or not, but currently they don't.

Repository owner locked as resolved and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants