This change introduces an ESM build which will allow tree shaking. A CJS build is also provided for backward compatibility.