webpack/webpack — pull request #626 by snapwich (2014-12-11 19:33:19+00:00)
Title: Walk computed MemberExpression properties

I had a bug with the DefinePlugin that wasn't properly replacing identifiers of the form;
var ob = {};
ob[CONST_VAR]
but would work with longer member expressions like
ob[CONST_VAR * 1]

I think I tracked the bug to this check for expression.property.type. According to https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API on MemberExpression there is a computed property that is not being taken into account and seems to be the correct signal for walking the expression as opposed to checking the property type.