taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

fix: use default export from he with destructering #92

Closed sastan closed 3 years ago

sastan commented 3 years ago

he is typed to provide named esm exports which is not strictly true altough it works with most bundlers. he is an UMD package that sets the module.exports to an object providing the exports. Some bundlers are only exposing module.exports as the default export and no named exports. All bundlers do expose module.exports as the default export.

This change allows node-html-parser to be compatible with all bundlers by destructering the default export and no using any named exports.