Open quan-nh-torus opened 4 weeks ago
Hi @quan-nh-torus
an example from sendbird
seems overly complicated and involving many other unrelated libraries, could you please create a minimal reproduction repository where the problem is happening? Thanks!
Hi @jbroma,
Apologies for the delayed response. I’ve created a sample chat project using Sendbird. Could you please review it when you have a moment? Here’s the link: repack-sendbird-example.
Thanks in advance!
Hi @quan-nh-torus,
please apply these changes in webpack.config.mjs
to fix the issue you were having:
diff --git a/webpack.config.mjs b/webpack.config.mjs
index 027c45c..27589e9 100644
--- a/webpack.config.mjs
+++ b/webpack.config.mjs
@@ -161,7 +161,6 @@ export default (env) => {
/node_modules(.*[/\\])+metro/,
/node_modules(.*[/\\])+abort-controller/,
/node_modules(.*[/\\])+@callstack[/\\]repack/,
- /node_modules(.*[/\\])+@sendbird[/\\]chat/,
/node_modules(.*[/\\])+@sendbird[/\\]uikit-react-native/,
/node_modules(.*[/\\])+@sendbird[/\\]uikit-chat-hooks/,
/node_modules(.*[/\\])+@sendbird[/\\]uikit-react-native-foundation/,
@@ -170,6 +169,21 @@ export default (env) => {
],
use: 'babel-loader',
},
+ {
+ test: /\.js$/,
+ include: [/node_modules(.*[/\\])+@sendbird[/\\]chat/],
+ use: {
+ loader: 'babel-loader',
+ options: {
+ presets: [
+ [
+ 'module:metro-react-native-babel-preset',
+ {disableImportExportTransform: true},
+ ],
+ ],
+ },
+ },
+ },
/**
* Here you can adjust loader that will process your files.
*
Describe the bug
Error when running app:
webpack.config.mjs
System Info
Re.Pack Version
4.0.0
Reproduction
No response
Steps to reproduce
May you try to init new RN 0.72 and using
@sendbird/chat
Could you please help me resolve this issue? If you have any questions or need further information, feel free to contact me. Thank you very much for your assistance.