SDK 4.13.2 uses Node libraries

[Problem]
Version 4.13.2 is showing the following messages when building a project with Vite for use in browser:

[plugin vite:resolve] Module "events" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin vite:resolve] Module "https" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "http" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "net" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "tls" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "stream" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "url" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "zlib" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "fs" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "path" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 
[plugin:vite:resolve] Module "os" has been externalized for browser compatibility, imported by "...node_modules/@sendbird/chat/lib/__bundle-85712b85.js". 

Version 4.13.1 didn’t have this issue.

Obviously these libraries do not exist when using the SDK in browsers.


[SDK Version]
4.13.2

Commit:

[Reproduction Steps]

  1. Install latest sendbird version in a vite project
  2. run vite build

[Current impact]

  1. Have no idea what is going to break on production.
  2. Nobody wants to see warnings in their build output.
1 Like

Hot fix is released as v4.13.3 that resolves the issue.

1 Like