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

Improve redecoration error naming #515

Closed
OrkhanAlikhanov opened this issue Nov 18, 2019 · 4 comments · Fixed by #516
Closed

Improve redecoration error naming #515

OrkhanAlikhanov opened this issue Nov 18, 2019 · 4 comments · Fixed by #516

Comments

@OrkhanAlikhanov
Copy link
Contributor

Recently we got an error in a webpack production build.

ERROR in dashboard.2bbdd6.js from Terser
module redeclared [dashboard.2bbdd6.js:6659,6]

It was confusing for us what module it is that's being referred. It turned out it's not an actual module, it is a variable named module. Would be easy for us if it was saying "module" is redeclared or something named "module" is redeclared at:

node.name + " redeclared",

I know it throws with filename and the line number, but in our case it was a single huge bundled file

@fabiosantoscode
Copy link
Collaborator

Thanks for pointing this out? Want to send a PR? "module" is redeclared sounds great to me.

@OrkhanAlikhanov
Copy link
Contributor Author

Is it okay to use ES6 template strings?

`"${node.name}" is redeclared`

@fabiosantoscode
Copy link
Collaborator

Yes, it is :)

@OrkhanAlikhanov
Copy link
Contributor Author

Sent the PR #516

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

Successfully merging a pull request may close this issue.

2 participants