By default, iframe addons are going to be hosted on different domain than shop/backoffice apps.
postMessagemechanism which is the only way to communicate is our case between frames.
All public packages which are designed for sdk communication are available in public npmjs repository.
Short summary of them:
- (Required) @one-commerce/sdk-core - core package which contains communication boilerplate
- (Required/Core dep) @one-commerce/sdk-shared - set of interfaces exchanged between ONe apps and SDK Core
- (Optional) @one-commerce/sdk-backoffice-vue3 - wrapper for sdk-core as Vue3 Plugin for
- (Optional) @one-commerce/sdk-shop-vue3 - wrapper for sdk-core as Vue3 Plugin for
The default way is using npm/yarn package manager to install desired packages
yarn add @one-commerce/sdk-core
npm i --save @one-commerce/sdk-core
In case we are not using any package manager it is possible to embed the package in script tag using minifued, UMD version. Since the packages are publicy available in npmjs repository it is possible to use public CDNs like
skypackor any other to embed the package.
Later on the package is globally available under