feat: add compatibility for AMD and CommonJS modules