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.

Find keep-fnames work-around

See original GitHub issue

keep-fnames will apply to all classes. If a developer is working in a large code-base, this could add a ton of bloat to their minified output.

I haven’t been able to look more into this issue yet, I hope to when I get time. One strategy I wonder about is simply adding a string property to each class identifying it rather than relying on the constructor name.

As always, I’m open to other thoughts.

For reference, the reason this is important for me is that when I apply nested groups to a dataframe, I need to recusrively traverse it, meaning I must distinguish a DataFrame from a GroupedDataFrame. While I’m handling that via on: string[], it’s inelegant, and something within the lib itself is failing.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Gmoussecommented, Nov 16, 2017

The checkTypes decorator is nifty, but do we really need run-time type checking?

No. I m agree, it’s not required. I will see to replace it in a next version. (It was planned but I had fixed this issue with keep-fnames due to a lack of personal time). I will try to see how to resolve this issue this week-end.

Uglify has a mangle options object

Oh, thanks for the trick. I will use it for my next projects. However, it will be useless to use this option if I remove checkTypes decorators (my main option here).

Thanks for the discussion, stay tuned for the fix (I will give you the feature branch for a feedback in the next 7 days).

0reactions
Gmoussecommented, Dec 13, 2017

Merged in 1.2.5 (published). Thanks for your issue. Have fun

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow passing mangle options to swc minify, such as ... - GitHub
Describe the solution you'd like. I would like to be able to set the following mangle options when ... mangle: { keepClassnames: true,...
Read more >
Rails, Webpacker, Terser keep_fnames - Stack Overflow
js . Through merging the config, the minimizer array gets concatenated and both Terser functions get executed! Solution: Add environment.config.
Read more >
Where can i set the option "keep-fnames" to true for the build?
To fix it I need to set the option “keep-fnames” to true when im building the project. I don't even know if it's...
Read more >
terser - npm
--keep-fnames Do not mangle/drop function names. Useful for code relying on ... By default `terser` will not work around Safari 10/11 bugs.
Read more >
jsexperimentslayout - client - node_modules - terser - GitLab
Find the changelog in CHANGELOG.md ... --keep-fnames Do not mangle/drop function names. ... By default `terser` will not work around Safari 10/11 bugs....
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