You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/chat/includes/chat-js.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,25 @@ The `--save` option lists the library as a dependency in your **package.json** f
60
60
61
61
### Set up the app framework
62
62
63
-
This article uses parcel to bundle the application assets. Run the following command to install it and list it as a development dependency in your **package.json**:
63
+
This article uses webpack to bundle the application assets. Run the following command to install it and list it as a development dependency in your **package.json**:
Create a **webpack.config.js** in the root directory of your project.
70
+
71
+
```js
72
+
module.exports= {
73
+
entry:"./client.js",
74
+
output: {
75
+
filename:"bundle.js"
76
+
},
77
+
devtool:"inline-source-map",
78
+
mode:"development"
79
+
}
80
+
```
81
+
68
82
Create an **index.html** file in the root directory of your project. Use this file as a template to add chat capability using the Azure Communication Chat SDK for JavaScript.
69
83
70
84
```html
@@ -76,7 +90,7 @@ Create an **index.html** file in the root directory of your project. Use this fi
76
90
<body>
77
91
<h4>Azure Communication Services</h4>
78
92
<h1>Chat Quickstart</h1>
79
-
<scriptsrc="./client.js"type="module"></script>
93
+
<scriptsrc="./bundle.js"></script>
80
94
</body>
81
95
</html>
82
96
```
@@ -110,12 +124,18 @@ console.log('Azure Communication Chat client created!');
110
124
111
125
### Run the code
112
126
127
+
Update the `scripts` section in the **package.json** to include "start"
0 commit comments