-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
minimize and production setting for ~ of iteration code ReferenceError #452
Comments
raw terser minimizes: (function() {
try {
const arr = [1];
for (const x of arr) {
}
} catch {
}
})() to !function(){try{for(const c of arr);}catch{}}(); Using |
thanks for moving |
1 task
Silly bug :/ I was fixing the catch scope and broke for loops inside try blocks. |
Thank you for the report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
What is the current behavior?
here is sample code.
here is config
ReferenceError: arr is not defined
seems like (try catch + for of) code is not working.
here is test repo
https://github.com/scarfunk/webpackbug-minimize
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Other relevant information:
webpack version: 4.39.3
Node.js version: 11.6.0 - ~/.nvm/versions/node/v11.6.0/bin/node
Operating System: macOS 10.14.4
Additional tools:
This issue was moved from webpack/webpack#9674 by @sokra. Original issue was by @scarfunk.
The text was updated successfully, but these errors were encountered: