We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug report
Version (complete output of terser -V or specific git commit)
terser -V
5.15.1
Complete CLI command or minify() options used
minify()
{ module: true, compress: true, toplevel: true }
terser input
terser
const obj = { value: 'c' }; export const compare = (x) => x === obj.value;
terser output or error
export const compare=o=>o===obj.value;
Leading to: Uncaught ReferenceError: obj is not defined
Uncaught ReferenceError: obj is not defined
Expected result
const c="c";export const compare=o=>o===c;
The text was updated successfully, but these errors were encountered:
For context, both of these work as expected:
const obj = { value: 'c' }; const compare = (x) => x === obj.value; export { compare } // Outputs: const c="c",o=o=>o===c;export{o as compare};
const obj = { value: 'c' }; export default (x) => x === obj.value; // Outputs: const t="c";export default c=>c===t;
Sorry, something went wrong.
4d37f39
No branches or pull requests
Bug report
Version (complete output of
terser -V
or specific git commit)5.15.1
Complete CLI command or
minify()
options usedterser
inputterser
output or errorLeading to:
Uncaught ReferenceError: obj is not defined
Expected result
The text was updated successfully, but these errors were encountered: