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

Fix a collision with exported variables with short names #1072

Merged
merged 2 commits into from Sep 22, 2021

Conversation

jridgewell
Copy link
Collaborator

@jridgewell jridgewell commented Sep 16, 2021

In some cases, it's possible to generate a collision between an exported variable declaration (which cannot be mangled) and a local reference. Eg,

// input
const n = null;
export const o = {o: n};

// options:
{ module: true, reduce_vars: false }

// output
const o=null;
export const o={o:o};

@fabiosantoscode
Copy link
Collaborator

This is looking great to merge but there's a TODO comment so I don't know

In some cases, it's possible to generate a collision between an exported variable declaration (which cannot be mangled) and a local reference. Eg,

```js
// reduce_vars: false
const n = null;
export const o = {o: n};
```
@jridgewell
Copy link
Collaborator Author

Removed. My intention was to check that #233 wasn't going to affect this, too.

@fabiosantoscode
Copy link
Collaborator

Got it 👍 thanks!

@fabiosantoscode fabiosantoscode merged commit ecb869e into terser:master Sep 22, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants