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

let versus var Treeshaking Issue Caused By Terser #64

Closed
Lonniebiz opened this issue Feb 1, 2019 · 5 comments
Closed

let versus var Treeshaking Issue Caused By Terser #64

Lonniebiz opened this issue Feb 1, 2019 · 5 comments

Comments

@Lonniebiz
Copy link

Lonniebiz commented Feb 1, 2019

  • Operating System: Ubuntu 16.04.5
  • Node Version: v10.14.2
  • NPM Version: 6.70
  • webpack Version: 4.29
  • terser-webpack-plugin Version: 1.10

I've been advised that a Tree-shaking issue I'm having in Webpack may be being caused by terser:
webpack/webpack#8692 (comment)

If you scroll up from that comment, you can see the entire issue.

I'm I submitting this at the correct place?

@alexander-akait
Copy link
Member

@Lonniebiz no, tree shaking it is part of webpack, we just wrapper around terser, you can look source code and find what we do nothing only call terser

@Lonniebiz
Copy link
Author

Lonniebiz commented Feb 1, 2019

@evilebottnawi : When I turn on terser's warnings option, I do see that terser is responsible for dropping unused functions and that's what tree-shaking is all about, right? And, btw, the comment I referenced above (where terser is suspected) was made by (I think) the creator of webpack.

I see what you're saying, this plugin has nothing to do with terser's actual code.

@alexander-akait
Copy link
Member

alexander-akait commented Feb 1, 2019

@Lonniebiz webpack/webpack#8692 (comment), please create issue in terser repo, thanks!

@Lonniebiz
Copy link
Author

terser/terser#249

@nyngwang
Copy link

nyngwang commented Apr 6, 2022

@Lonniebiz Oh fuck! (Sorry to be rude) This is exactly the problem I'm trying to solve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants