Quick Update
Platform packages, cross-platform core packages, and official plugin packages share synchronized versioning for easier memorization and consistency.
If version conflicts occur due to old cache, please delete the lock file and node_modules, then reinstall dependencies.
One-Click Update
Run the following command in your project root to update all dependencies to the latest allowed versions.
npm updatepnpm updateyarn updatebun updateOr update only Leafer-related packages (recommended to wrap this in a package.json script):
npm update leafer-ui @leafer-in/editor ... # plugin packages must come after the main packagepnpm update leafer-ui @leafer-in/editor ... # plugin packages must come after the main packageyarn update leafer-ui @leafer-in/editor ... # plugin packages must come after the main packagebun update leafer-ui @leafer-in/editor ... # plugin packages must come after the main packageFor packages imported via <script> tags, simply update the version number to the latest one.
Recommended Long-Term Solution
When installing for the first time, use the cross-platform core package to avoid manual version mismatches between plugin packages.
# When using plugins, it is recommended to install core packages together to avoid version mismatch issues
npm install leafer-ui @leafer-ui/core @leafer-ui/drawpnpm add leafer-ui @leafer-ui/core @leafer-ui/drawyarn add leafer-ui @leafer-ui/core @leafer-ui/drawbun add leafer-ui @leafer-ui/core @leafer-ui/drawYou can also install the full leafer package and use sub-package imports to reduce bundle size.
Version
Latest version: v2.1.0
import { version } from 'leafer-ui'
console.log(version)