Migration & Upgrade Guide
This guide covers how to upgrade between Vue Native releases, including version-specific changes, breaking changes, and recommended post-upgrade steps.
General Upgrade Procedure
Every Vue Native upgrade follows the same high-level steps:
- Update npm packages:
bun update @thelacanians/vue-native-runtime \
@thelacanians/vue-native-navigation \
@thelacanians/vue-native-vite-plugin \
@thelacanians/vue-native-cli
Rebuild native projects. Native fixes ship in the Swift Package (iOS) and Gradle module (Android). You must rebuild to pick them up --
vue-native run iosandvue-native run android.Run your test suite and verify all screens manually.
Tips
Always read the version-specific notes below before upgrading. Some releases require additional native-side steps.
v0.3.0 to v0.4.0
Release date: 2026-02-24 -- Production hardening. No breaking changes.
What changed
- Thread safety (iOS): Timer and
requestAnimationFramepolyfills now dispatch to the JS serial queue, preventing rare crashes under heavy concurrent animation. - Layout retry limits: The layout engine caps retry attempts to avoid infinite loops when a measure function returns inconsistent results.
- Gesture recognizer cleanup:
VCheckbox,VRadio,VText, andVSegmentedControlfactories now remove gesture recognizers when the native view is recycled. Fixes memory leaks in long-lived lists. - Navigation state restoration: A race condition during rapid app backgrounding/foregrounding has been resolved.
- Test coverage: Expanded from 319 to 465 tests.
Recommended actions
- Rebuild the Swift Package in Xcode (File -> Packages -> Resolve Package Versions) to pick up the thread-safety fix.
- Rebuild the Android project with
./gradlew clean assembleDebug. - Re-test screens that use
VCheckbox,VRadio, orVSegmentedControlinside aVList.
v0.2.0 to v0.3.0
Release date: 2026-02-23 -- Bug fixes. No breaking changes.
What changed
- Memory leak fixes: Android
VListFactory,VModalFactory, andHotReloadManagernow release references correctly. iOSVButtonFactoryleak resolved. - Race conditions: Android hot reload no longer loses polyfill registrations during rapid reloads.
nodeChildrencleanup is now atomic. - Crash fixes:
NaNvalues passed toasIntno longer crash the bridge. Uncaught bridge errors are caught and logged. - Render loop resilience: The render loop recovers from individual frame errors instead of halting.
- Callback ID overflow: Callback IDs now wrap safely at
Number.MAX_SAFE_INTEGER.
Recommended actions
- Update all
@thelacanians/vue-native-*packages to0.3.x. - Rebuild both native projects.
Warning
If your app uses VList with VModal on Android, this update is strongly recommended. The memory leak in v0.2.0 can cause the app to be killed by the OS after extended use.
v0.1.0 to v0.2.0
Release date: 2026-02-21 -- Major release adding Android. Contains breaking changes.
Breaking changes
All npm packages moved to the @thelacanians/ scope:
| v0.1.0 | v0.2.0 |
|---|---|
@vue-native/runtime | @thelacanians/vue-native-runtime |
@vue-native/navigation | @thelacanians/vue-native-navigation |
@vue-native/vite-plugin | @thelacanians/vue-native-vite-plugin |
@vue-native/cli | @thelacanians/vue-native-cli |
Step-by-step upgrade
- Remove old packages and install new ones:
bun remove @vue-native/runtime @vue-native/navigation @vue-native/vite-plugin
bun add @thelacanians/vue-native-runtime @thelacanians/vue-native-navigation
bun add -d @thelacanians/vue-native-vite-plugin @thelacanians/vue-native-cli
- Update all imports across your codebase:
// Before
import { VView, VText } from '@vue-native/runtime'
import { createRouter } from '@vue-native/navigation'
// After
import { VView, VText } from '@thelacanians/vue-native-runtime'
import { createRouter } from '@thelacanians/vue-native-navigation'
- Update
vite.config.ts:
import vueNative from '@thelacanians/vue-native-vite-plugin'
- Add the Android project if you want Android support. Scaffold a fresh project and copy the
android/directory:
npx @thelacanians/vue-native-cli create temp-project
cp -r temp-project/android ./android
rm -rf temp-project
- Rebuild and test on both platforms.
Caution
The old @vue-native/* packages are no longer published. You must migrate to @thelacanians/* to receive future updates.
Updating Native Dependencies
iOS (Swift Package)
- Open your
.xcodeprojor.xcworkspacein Xcode. - Navigate to File -> Packages -> Update to Latest Package Versions.
- Clean the build folder: Product -> Clean Build Folder (Shift+Cmd+K).
- Build and run.
If you use a local copy of the Swift Package (in native/ios/), pull the latest source and rebuild.
Android (Gradle)
- If using a remote dependency, bump the version in
android/app/build.gradle:
implementation 'com.thelacanians:vue-native-core:0.4.0'
- Sync Gradle: File -> Sync Project with Gradle Files in Android Studio.
- Clean and rebuild:
cd android && ./gradlew clean assembleDebug.
Troubleshooting Upgrades
Stale JavaScript bundle
After updating npm packages, the old Vite output may be cached. Force a clean build with rm -rf dist/ && bun run vite build.
Cached node_modules
If you see unexpected module resolution errors, remove and reinstall:
rm -rf node_modules bun.lockb
bun install
Xcode Derived Data
If you get "module compiled for a different version" errors after updating the Swift Package, clear the Xcode cache with rm -rf ~/Library/Developer/Xcode/DerivedData and rebuild.
Android build cache
Stale class files can persist across Gradle builds. Clean thoroughly:
cd android && ./gradlew clean && rm -rf .gradle build app/build && cd ..
Hot reload stops working after upgrade
The dev server and native HotReloadManager must use the same WebSocket protocol. After upgrading, restart the dev server and rebuild the app with vue-native dev --ios (or --android).
Tips
When in doubt, the nuclear option works: delete node_modules, dist/, Xcode Derived Data, and the Android .gradle cache, then reinstall and rebuild from scratch.