Wrap "export = esprima" up in an external module