I want to integrate https://github.com/Microsoft/BotFramework-WebChat/tree/v3 into my react app.
I have followed the below method and run npm install but it aint working.i have set my file to botchat.js in package.json. "dependencies": { "react": "^16.8.6", "react-dom": "^16.8.6", "react-scripts": "3.0.1", "botframework-webchat": "file:../../BotFramework-WebChat-3/botchat.js.map" }
In your React website, incorporate a custom build of the Web Chat component The simplest approach is to clone (or fork) this repo, alter it, build it, then reference your local build in your project's package.json as follows:
dependencies: { ... 'botframework-webchat': 'file:/path/to/your/repo' ... } Running npm install will copy your local repo to node_modules, and import/require references to 'botframework-webchat' will resolve correctly.
You may also wish to go so far as to publish your repo as its own full-fledged, versioned npm package using npm version and npm publish, either privately or publicly.
Different projects have different build strategies, yours may vary considerably from the above. If you come up with a different integration approach that you feel would have broad application, please consider filing a pull request for this README.
Building Web Chat Clone (or fork) this repo npm install npm run build (to build on every change npm run watch, to build production npm run prepublish) This builds the following:
/built/.js compiled from the TypeScript sources in /src/.js - /built/BotChat.js is the root /built/.d.ts declarations for TypeScript users - /built/BotChat.d.ts is the root /built/.js.map sourcemaps for easier debugging /botchat.js webpacked UMD file containing all dependencies (React, Redux, RxJS, etc.) /botchat.css base stylesheet /botchat-es5.js is the Webpack bundle (a.k.a. botchat.js) plus polyfills for ES5 browsers /botchat-fullwindow.css media query stylesheet for a full-window experience.
I want to customize my Botframework and execute it
Aucun commentaire:
Enregistrer un commentaire