Skip to content

fix(storage-plugin): strip from production builds#205

Merged
V3RON merged 1 commit intomainfrom
fix/storage-plugin-in-prod
Mar 25, 2026
Merged

fix(storage-plugin): strip from production builds#205
V3RON merged 1 commit intomainfrom
fix/storage-plugin-in-prod

Conversation

@V3RON
Copy link
Copy Markdown
Contributor

@V3RON V3RON commented Mar 24, 2026

Description

Updates the storage plugin React Native entry point so the adapter factories follow the same guarded pattern as useRozeniteStoragePlugin. In production, the entry now exposes no-op adapter factories instead of statically re-exporting the real adapter modules, which keeps the storage plugin implementation out of production bundles.

Related Issue

N/A

Context

Guarding only the main hook was not enough because the entry file still re-exported createAsyncStorageAdapter, createExpoAsyncStorageAdapter, createExpoSecureStorageAdapter, and createMMKVStorageAdapter directly. That forced the adapter implementation into the bundle even when the hook itself was stripped. The entry now lazily requires the real factories only in supported dev React Native environments and returns empty adapters everywhere else.

Testing

Not run (entry-point export change only).

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
rozenite Skipped Skipped Mar 24, 2026 4:42pm

Request Review

@V3RON V3RON force-pushed the fix/storage-plugin-in-prod branch from 21ab7c1 to cdcd4cb Compare March 24, 2026 16:42
@V3RON V3RON merged commit 1da730d into main Mar 25, 2026
3 checks passed
@V3RON V3RON deleted the fix/storage-plugin-in-prod branch March 25, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant