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.

shakes out functions that I used

See original GitHub issue

I’m not sure if this plugin in production ready yet, but it seems that it removed functions that I’m definitely using.

Using import to get the modules, but running babel as a browserify transform, so that should rewrite everything to require.

seems that most of the incorrectly removed functions are from the crypto-browserify package.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

retail-robotcommented, Apr 20, 2018

Hi - I’m running into this issue too - I threw together a project that reproduces the issue here:

You should be able to clone it and just npm install + npm run build

toddselfcommented, Apr 26, 2018

hi! we just ran into this too with the sbd library.

it is stripping out /lib/Match.js:isCaptialized, even though that function is called via this within the code.

09:42:00 ~/src/sbd:master
↳ npx browserify -p common-shakeify lib/tokenizer.js > shake.js
09:42:07 ~/src/sbd:master
↳ npx browserify lib/tokenizer.js > no-shake.js
09:45:03 ~/src/sbd:master
↳ grep isCapitalized shake.js
/* common-shake removed: exports.isCapitalized = */ void function(str) {
    return this.isCapitalized(str) || /``|"|'/.test(str.substring(0,2));
    return this.isCapitalized(str);
        if (wordCount < 5 && words[0].length < 6 && this.isCapitalized(words[0])) {
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tree shaking: are unused functions included to a bundle?
Do modern bundlers like Webpack or Rollup shake out only unused modules or are they capable of removing unused functions (or variables, ...
Read more >
How to Use (& Disable) Shake to Undo on iPhone - YouTube
Did you know you can shake your iPhone to undo typing, deleting an email, and other actions? Watch this tutorial to learn how...
Read more >
JavaScript tree shaking, like a pro | by Daniel Brain - Medium
Tree shaking in JavaScript is becoming an essential practice, to avoid large bundle sizes and improve performance.
Read more >
How to use 'Shake to Undo' typing on iPhone - Mashable
With Shake to Undo turned on, iOS users can quickly fix mistakes, such as shake to undo typing in a text, shake to...
Read more >
Can Shaking Help You Heal Stress & Trauma? Some Experts ...
Shaking therapy can be performed seated or standing. Focus on particular parts of the body, simply shaking it out.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found