@syncpilot/sp-lib-chat-comms
v0.0.3
Published
This library is used to facilitate communication between the shell application and our chat client microfrontend by exchanging information. It serves as a shared communications library and is implemented on both sides to enable seamless communication.
Downloads
2
Readme
sp-lib-chat-comms
This library is used to facilitate communication between the shell application and our chat client microfrontend by exchanging information. It serves as a shared communications library and is implemented on both sides to enable seamless communication.
Linking
To link the library, follow the steps below:
- In the library, run the command
npm run build
to create a/dist
folder. - CD into the
/dist
folder. - Open a command line and run
npm link
. - In both the microfrontend and shell applications, go to the root of the project (where node modules are located) and run
npm link @syncpilot/[email protected]
. - In the
webpack.config.js
file, where the libraries are shared, also share the communications library. Be sure to set the required version to0.0.3
(as specified in the library'spackage.json
). Note that setting the version to 'auto' is not possible in local development since the library is linked and not actually in the node modules folder. However, if you're only using the microfrontend and not developing it, you can simply runnpm i
to install the library and keep the version set to 'auto'.
shared: share({
[angular libraries from above]
'@syncpilot/sp-lib-chat-comms': {
singleton: true,
strictVersion: true,
requiredVersion: '0.0.3',
},
}),