Hey!
We're trying to migrate some parts of the insights UI to this chat-comonents package to make everything more consistent.
We noticed that the exports field of the package.json doesn't export types, and instead there is an extra types entry in package.json. Typescript complains about this, stating
Could not find a declaration file for module '@cognigy/chat-components'. '.../node_modules/@cognigy/chat-components/dist/chat-components.js' implicitly has an 'any' type.
There are types at '.../node_modules/@cognigy/chat-components/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@cognigy/chat-components' library may need to update its package.json or typings.ts(7016)
I think updating exports to something like
"exports": {
"import": "./dist/chat-components.js",
"require": "./dist/chat-components.js"
"types": "./dist/index.d.ts",
},
Would fix this. What do you think?
Cheers,
Janis
Hey!
We're trying to migrate some parts of the insights UI to this chat-comonents package to make everything more consistent.
We noticed that the
exportsfield of the package.json doesn't export types, and instead there is an extratypesentry in package.json. Typescript complains about this, statingI think updating
exportsto something likeWould fix this. What do you think?
Cheers,
Janis