strophe / strophejs

Strophe.js is an XMPP library for JavaScript
http://strophe.im/strophejs
MIT License
1.46k stars 365 forks source link

Type error on import in typescript project #726

Closed genericFJS closed 3 months ago

genericFJS commented 3 months ago

When I try to import the package in my node/typescript project, I get an error: image If I explicitly add the "types" to the "exports" in the stroph.js "package.json", everything works:

  "exports": {
    "node": {
      "import": "./dist/strophe.esm.js",
      "require": "./dist/strophe.common.js"
    },
    "types": "./src/types/index.d.ts"
  },

Could this fix be included, please?

genericFJS commented 3 months ago

My bad: I just had a look at the package.json in the master branch and it already is included: https://github.com/strophe/strophejs/blob/0abfc1cfb6a6073508c4258eebc75f619c3b8241/package.json#L50 Follow up question: Could this update be pushed to npm, please?

jcbrand commented 3 months ago

Done :+1: