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

Include tslib as a Shared Dependency #67

Closed
FlorianRappl opened this issue Aug 30, 2019 · 1 comment
Closed

Include tslib as a Shared Dependency #67

FlorianRappl opened this issue Aug 30, 2019 · 1 comment
Labels
cli Concerns the piral-cli application. core Concerns the piral-core library. dependencies Pull requests that update a dependency file enhancement New feature or request
Milestone

Comments

@FlorianRappl
Copy link
Contributor

Description

Currently, piral-core (and dependents such as piral) use tslib. As such it should be a no-brainer to also expose tslib as a shared dependency. This can significantly reduce bundle size.

Background

tslib contains all runtime helpers of TypeScript. These helpers are auto-generated by default, but can be referenced implicitly using the "importHelpers": true setting in the compilerOptions of the tsconfig.

Naturally, the tsconfig of a Piral instance / pilets should contain this flag and use the then shared dependency to reduce output sizes.

Discussion

Maybe other shared runtime libs (e.g., for async code the regenerator package comes to my mind) should be shared similarly. Right now, however, it is unclear how its exposed. Potentially, this should therefore be left to the specific Piral instance to decide.

@FlorianRappl FlorianRappl added enhancement New feature or request cli Concerns the piral-cli application. core Concerns the piral-core library. dependencies Pull requests that update a dependency file labels Aug 30, 2019
@FlorianRappl FlorianRappl added this to the 0.7.0 milestone Aug 30, 2019
@FlorianRappl
Copy link
Contributor Author

Landed in develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Concerns the piral-cli application. core Concerns the piral-core library. dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant