Skip to content

Conversation

sravan-s
Copy link
Contributor

Fixes:

  • Donot bundle chat sdk with uikit compiled code

Compiled UIKit code that is distributed through npm shouldnt have Chat SDK minified code included in it Chat SDK should be a dependency of UIKit
Advantages:

  • Chat SDK bug fixes will be added for free
  • Eliminate the need for handlers What caused the issue:
    If you are usig rollup for bundling
    in config.external you have to be specific
    ie>
    This works:
external: [
  '@sendbird/chat',
  '@sendbird/chat/groupChannel',
  '@sendbird/chat/openChannel',
  '@sendbird/chat/message',
]

This doesnt:

external: [ '@sendbird/chat', ]
  • Only react and react-dom should be peerDependencies

For npm >= v7, npm autoinstall peerDependency packages According to https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies You want to express the compatibility of your package with a host tool or library while not necessarily doing a require of this host Even though react is required, its better to show that react is the host tool

@sravan-s sravan-s requested a review from HoonBaek September 30, 2022 07:27
@sravan-s sravan-s self-assigned this Sep 30, 2022
Fixes:

* Do not bundle chat SDK with uikit compiled code

Compiled UIKit code that is distributed through npm shouldn't
have Chat SDK minified code included in it
Chat SDK should be a dependency of UIKit
Advantages:
  * Chat SDK bug fixes will be added for free
  * Eliminate the need for handlers
What caused the issue:
If you are using rollup for bundling
in config.external you have to be specific
ie>
This works:
```
external: [
  '@sendbird/chat',
  '@sendbird/chat/groupChannel',
  '@sendbird/chat/openChannel',
  '@sendbird/chat/message',
]
```
This doesn't:
```
external: [ '@sendbird/chat', ]
```

* Only react and react-dom should be peerDependencies

For npm >= v7, npm autoinstall peerDependency packages
According to `https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies`
You want to express the compatibility of your package with a host tool
or library while not necessarily doing a require of this host Even though react is required,
its better to show that react is the host tool
@sravan-s sravan-s changed the title [v3.2.1] (Oct 02 2022) [v3.2.1] (Oct 04 2022) Oct 4, 2022
@sravan-s sravan-s merged commit 214675a into main Oct 4, 2022
@sravan-s sravan-s deleted the release/3.2.1 branch October 4, 2022 05:20
sravan-s added a commit that referenced this pull request Oct 4, 2022
Fixes:

* Donot bundle chat sdk with uikit compiled code

Compiled UIKit code that is distributed through npm shouldnt have Chat SDK minified code included in it Chat SDK should be a dependency of UIKit

Advantages:
  * Chat SDK bug fixes will be added for free
  * Eliminate the need for handlers

What caused the issue:
If you are usig rollup for bundling
in config.external you have to be specific
ie>
This works:
```
external: [
  '@sendbird/chat',
  '@sendbird/chat/groupChannel',
  '@sendbird/chat/openChannel',
  '@sendbird/chat/message',
]
```
This doesnt:
```
external: [ '@sendbird/chat', ]
```

* Only react and react-dom should be peerDependencies

For npm >= v7, npm autoinstall peerDependency packages According to https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies You want to express the compatibility of your package with a host tool or library while not necessarily doing a require of this host Even though react is required, its better to show that react is the host tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants