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

module no longer avoided as a variable name #2886

Closed
Conduitry opened this issue May 31, 2019 · 1 comment · Fixed by #2889
Closed

module no longer avoided as a variable name #2886

Conduitry opened this issue May 31, 2019 · 1 comment · Fixed by #2889

Comments

@Conduitry
Copy link
Contributor

  • Rollup Version: 1.13.0
  • Operating System (or Browser): Linux
  • Node Version: 12.3.1

How Do We Reproduce?

Between 1.12.5 and 1.13.0, module stopped being avoided as a variable name. Compare this REPL and this one. The code produced in the REPL doesn't cause an error in Node, but if you bundle with preferConst: true, it results in const module = 42;, which Node does complain about as being a variable getting redeclared.

Expected Behavior

module should continue to be deconflicted from the Node built-in, at least in preferConst mode.

Actual Behavior

Rollup will output code like const module = 42;, which Node doesn't like.

@lukastaegert
Copy link
Member

Thanks for spotting this, proper fix at #2889

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