**Related issue:** - Closes https://github.com/swc-project/swc/issues/5090. - Closes https://github.com/swc-project/swc/issues/5766.