question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Exclude tslib from bundle?

See original GitHub issue

🐞 Bug report

Description

https://bundlephobia.com/package/@micro-sentry/browser@6.0.0 shows that a big part of the package size comes from tslib. Is that necessary in the browser bundle?

Reproduction

Go to https://bundlephobia.com/package/@micro-sentry/browser@6.0.0

Expected behavior

https://bundlephobia.com/package/@micro-sentry/browser@6.0.0 doesn’t show tslib (if possible?)

Versions

Additional context

It looks like tslib is only being used for __assign. Would it be possible to use a different polyfill or perhaps avoid Object.assign and add the keys directly?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
danielcomptoncommented, Aug 29, 2022

Great, thanks! Looking good.

image

0reactions
IKatsubacommented, Aug 29, 2022

@danielcompton thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove tslib from peerDependencies of typescript plugin #265
We force the use of tslib to avoid duplicate code in the bundle. The relative Typescript compiler settings are always used. Without it,...
Read more >
"This syntax requires an imported helper but module 'tslib ...
This results in an error: src/index.ts:5:1 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
Read more >
This syntax requires an imported helper but module 'tslib ...
To solve the error "This syntax requires an imported helper but module 'tslib' cannot be found", install tslib by running npm install -D...
Read more >
tslib - npm
This is a runtime library for TypeScript that contains all of the TypeScript helper functions. This library is primarily used by the -- ......
Read more >
rollup-plugin-typescript | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found