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
See example
const getString = () => { switch ("apple") { case 'apple': return '1'; case 'banana': return '2'; } return "3" }; console.log(getString());
{ "jsc": { "parser": { "syntax": "ecmascript", }, "target": "es5", "minify": { "mangle": false, "compress": true, } }, }
https://play.swc.rs/?version=1.7.28&code=H4sIAAAAAAAAA0vOzysuUUhPLQkuKcrMS1ewVdDQVLC1U6jm5VJQKC7PLEnOUNBQSiwoyElV0oSIKigkJxanKqiDBdWtIEIKCkWpJaVFeQrqhurWyKqSEvOAEFOZEURZLYiAiikZK%2FFy1QKFQTAZ6LD8nFS9nPx0DbjzNDQ1rQEoac67sgAAAA%3D%3D&config=H4sIAAAAAAAAAzWMQQqFMAwF9z1FyNqtG28TSpSKrSWJoEjvbqz%2Fbx7MDLw7AK4acYI7AGAlUZYfAepVjE5H5JhJo6RqOHhq76CRLGw969g95lTSfP0PnKksGzvPtCkPn4x7rsKqrk2Oblt4P9sDpwS%2Bn48AAAA%3D
No response
console.log('1');
console.log('3');
1.7.28
The text was updated successfully, but these errors were encountered:
Surprisingly, disabling the dead_code option in the compressor corrects the situation...
Sorry, something went wrong.
6f52949
Austaras
Successfully merging a pull request may close this issue.
Describe the bug
See example
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.28&code=H4sIAAAAAAAAA0vOzysuUUhPLQkuKcrMS1ewVdDQVLC1U6jm5VJQKC7PLEnOUNBQSiwoyElV0oSIKigkJxanKqiDBdWtIEIKCkWpJaVFeQrqhurWyKqSEvOAEFOZEURZLYiAiikZK%2FFy1QKFQTAZ6LD8nFS9nPx0DbjzNDQ1rQEoac67sgAAAA%3D%3D&config=H4sIAAAAAAAAAzWMQQqFMAwF9z1FyNqtG28TSpSKrSWJoEjvbqz%2Fbx7MDLw7AK4acYI7AGAlUZYfAepVjE5H5JhJo6RqOHhq76CRLGw969g95lTSfP0PnKksGzvPtCkPn4x7rsKqrk2Oblt4P9sDpwS%2Bn48AAAA%3D
SWC Info output
No response
Expected behavior
Actual behavior
Version
1.7.28
Additional context
No response
The text was updated successfully, but these errors were encountered: