Skip to content

botframework-streaming should separate main/browser exports #1669

@compulim

Description

@compulim

Versions

master as of right now.

Describe the bug

I briefed @stevengum and @ckkashyap offline on this one.

In https://github.com/microsoft/botbuilder-js/blob/master/libraries/botframework-streaming/src/index.ts, it is exporting namedPipe.js, which depends on Node.js net package.

Instead, we should have 2 entrypoints, one for Node.js and one for browser. For the browser one, it should not export namedPipe.js.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Webpack project
  2. Include botframework-streaming
  3. Run Webpack to bundle

Expected behavior

Webpack should not throw error.

Instead, Webpack is complaining it cannot bundle net package. This is because botframework-streaming/namedPipe.js depends on botframework-streaming.

Additional context

Also same for Node.js, which should not include dependencies that is targeting only browsers.

[bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions