Skip to content

Commit a69c501

Browse files
authored
chore: improve ESM <-> CJS compatibility with rollup interop: "compat" (#1176)
https://sendbird.atlassian.net/browse/CLNP-4373 Aims to enhance the compatibility between ESM and CJS by updating the Rollup configuration to include `interop: "compat"` setting for the CommonJS output. This change ensures better interoperability and resolves potential issues when using the @sendbird/chat SDK in mixed module environments (ESM <-> CJS). ### Checklist - [x] verified that no lines throw errors: ``` const chatSDK = require('path-to-chat-sdk'); console.log(chatSDK); console.log(chatSDK.default); if (chatSDK.default) { chatSDK.default.init(); } else { chatSDK.init(); } ``` - [x] no errors during the build step
1 parent 7cad521 commit a69c501

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rollup.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default {
3434
chunkFileNames: 'chunks/bundle-[hash].js',
3535
format: "cjs",
3636
sourcemap: true,
37+
interop: "compat",
3738
},
3839
],
3940
external: [

0 commit comments

Comments
 (0)