Unable to import createDirectLine, createStore in Typescript with v4.13 #3856
Labels
Bot Services
Required for internal Azure reporting. Do not delete. Do not change color.
bug
Indicates an unexpected problem or an unintended behavior.
customer-replied-to
Required for internal reporting. Do not delete.
customer-reported
Required for internal Azure reporting. Do not delete.
ExemptFromDailyDRIReport
exempt from daily DRI report
p0
Must Fix. Release-blocker
Milestone
Screenshots
file
lib\index.d.ts
from version v4.13.0 (left) vs v4.11.0 (right)Version
NPM: v4.13.0
Describe the bug
The issue is present in the npm package
botframework-webchat
used in a react website (https://github.com/microsoft/BotFramework-WebChat/tree/master/packages/bundle/src
)The output lib folder contains a
index.d.ts
that is created using the newsrc\index.tsx
and notsrc\index.ts
. This is probably an issue with webpack output configuration in v4.13Due to this the following line fails to compile in ts/vscode
explicitly referencing lib/index.js does not work and is unable to recognize the exports.
Considering this work in v4.11.0, I would consider this a regression introduced in v4.13
Steps to reproduce
Expected behavior
The bundled package should support importing createDirectLine, createStore from 'botframework-webchat'
The above code works in v4.11.0.
Additional context
Suggest to rename the
src\index.tsx
added as part of PR #3818, creating a correct webpack outputThe react samples in
https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/01.getting-started/g.hybrid-react-npm/packages/chat-component
have not been updated to v4.13 else they would showcase similar issues.The text was updated successfully, but these errors were encountered: