Migrating from v3 to v4

v4 adds a light build (vue3-lottie/light) for animations that don't need After Effects expressions. It avoids the eval warning from lottie-web and gives a smaller bundle.

The library was also rebuilt on Vite 8 with a new internal structure. The public API hasn't changed: the props, events, methods and the vue3-lottie import all behave exactly as they did in v3. Because the build output was reorganised, this is released as a major version to be safe.

Upgrading to v4

pnpm
pnpm add vue3-lottie@latest
npm
npm install vue3-lottie@latest --save
yarn
yarn add vue3-lottie@latest

For most projects, that's all you need to do.

What changed

  • New vue3-lottie/light entry. Optional. See Light build.
  • Declaration files were reorganised. Type files now sit directly in dist/ and not in dist/src/. This only matters if you imported types from a path inside dist. Import them from vue3-lottie instead:
    import type { AnimationItem } from 'vue3-lottie'
✨ Well done! You have successfully upgraded to v4.