The call _
parser plugin hook doesn't get executed because it's already been transformed into a BasicEvaluatedExpression, so this conditional is false:
https://github.com/webpack/webpack/blob/v1.13.1/lib/Parser.js#L726
I can hook into the program
part of the parse (ie. compiler.parser.plugin('program')
) but then I have to traverse the ast myself (which is doable but I'd prefer to use the call _
hook).
Question: is there a better way than using compiler.parser.plugin('program', function(ast) { .. })
here?