The generated library using Skedulo SDK
Create libraries with the SDK
Skedulo library is a JS module that can be included in other JS modules’ dependencies.
Libraries can come in any form of modules, however, the library by default are setup to build with the CommonJS module type
Libraries are the base component for use in the packages dependency system as no other components support being directly linked to each other.
How does the dependency work?
For a component to make use of a library as a dependency, it needs to define a link to the library in its project metadata.
Once defined, the package will apply the link as it loads in the SDK.
Application of links involves running the add local dependency operation within the backing module system (yarn in our case).
With Yarn this is all that’s required as the bundler will actually traverse the relative path of the dependency and bundle any referenced code.
For this reason, the metadata can be considered the source of truth of any dependencies.
It’s highly recommended that symlinks are avoided between dependencies as it’s possible to accidentally store these in source control.
The symlinks aren’t necessarily relative paths in all systems, so they won’t always work and may cause problems with refreshing a link.
A package library that share react components for both web extension and mobile extension
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.