Rich-Harris / butternut

The fast, future-friendly minifier
https://butternut.now.sh
MIT License
1.17k stars 17 forks source link

Shorthand properties fail #6

Closed Rich-Harris closed 7 years ago

Rich-Harris commented 7 years ago
// input
(function () {
  var longname = 1;
  var obj = { longname };
  console.log(obj);
}());

// expected
!function(){var a=1,b={longname:a};console.log(b)}()

// actual
!function(){var a=1,b={a};console.log(b)}()
Rich-Harris commented 7 years ago

Fixed in 0.3.2