You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is the __webpack_require__ function, it will pass it self to another fucntion call,
but the parameter i was renamed to n which same as the function name after minified thus cause a runtime error, `n is not a function', and I can reproduce it since @swc/core@1.3.102
suguanYang
changed the title
SWC minify cause function parameter name collision with function name
SWC minify mangle cause function parameter name collision with function name
Sep 10, 2024
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
before minify
after minified:
this is the
__webpack_require__
function, it will pass it self to another fucntion call,but the parameter
i
was renamed ton
which same as the function name after minified thus cause a runtime error, `n is not a function', and I can reproduce it since @swc/core@1.3.102Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.24&code=H4sIAAAAAAAAA02QwQrCMAyG732KeEthiLtadhNfwKN4KDaDwtZKzYYgfXez1o1dmuTv%2F%2F0N7afwZB8DML0ZNXwVAPariGN000BVBtj0a0yj5RsFd7Fs0ckhnlxMNNsBtZE%2B66WqHRfQr1mzTZBa6IDv%2FmGK5HvAOXoHJzh0ndxqSMRTCtIe6fOKid9mg%2BMC40JLrZnyeHWdZZmmSFlX4h9EYsfYNkKviQ0EvZ%2FL5iqr%2BiFG%2FQD0Y8rwIgEAAA%3D%3D&config=H4sIAAAAAAAAA32QS2oDMRBE9z7FoLUXdiAm5ATZ5AyhkUtGTutDt8Z4ML57NF%2FGwclKUr1StVS3TdOYs1rz3tzqth4yiUKWc1W0i4WuVTGwgdSKz8VsZ3rWHjlixSDdR2KKUFSXJFQaW%2BZZJjmhDGH6stu%2FTkGGU1LMQZOGa4FE4g9whugvGnz0rls%2FNFA8MVZKPy9lxgX8eHlA30D%2BskyqkQL0L4f7l2bxFyqoa8rPTB5vT1QlR%2BL3u4fmlu6qwaaQBdonFmmnZjeTw4R0bFcfNaXLGCs9mMXk9XO29RHjxbmzcer9B1ovmo%2F%2FAQAA
SWC Info output
No response
Expected behavior
do not collision between function name and function parameter when function close over it self in its frame
Actual behavior
No response
Version
1.7.24
Additional context
No response
The text was updated successfully, but these errors were encountered: