Skip to content

fix(js-utils): remove webpackIgnore from ExpoSecureStore dynamic import#202

Open
shafaladhikari wants to merge 2 commits into
kinde-oss:mainfrom
shafaladhikari:main
Open

fix(js-utils): remove webpackIgnore from ExpoSecureStore dynamic import#202
shafaladhikari wants to merge 2 commits into
kinde-oss:mainfrom
shafaladhikari:main

Conversation

@shafaladhikari
Copy link
Copy Markdown

@shafaladhikari shafaladhikari commented Mar 14, 2026

Explain your changes

This PR removes the webpackIgnore: true hint from the dynamic import
used to load the Expo secure store implementation.
Fixes #212

Problem

The current implementation:

await import(/* webpackIgnore: true */ "./sessionManager/stores/expoSecureStore.js")

prevents bundlers from resolving the module. While this avoids some
Webpack resolution issues in web environments, it causes problems for
Expo / React Native environments because Metro cannot correctly resolve
and bundle the module.

As a result, the Expo SDK cannot load the secure store implementation at
runtime when upgrading @kinde/js-utils.

Solution

Remove the webpackIgnore hint so bundlers can resolve the module
normally:

await import("./sessionManager/stores/expoSecureStore.js")

Validation

Tested with:

  • Next.js SDK -- build and runtime still work correctly
  • Expo SDK -- secure store module resolves and loads correctly

This change only removes the webpack hint and does not alter runtime
logic.


Checklist

  • I have read the "Pull requests" section in the contributing
    guidelines.
  • I agree to the terms within the code of conduct.

@shafaladhikari shafaladhikari requested a review from a team as a code owner March 14, 2026 10:20
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 14, 2026

Walkthrough

Two files have been updated to remove webpack-specific webpackIgnore directives from dynamic import statements. The imports now use plain dynamic import syntax. Runtime behavior and return types remain unchanged; only bundler configuration is affected.

Changes

Cohort / File(s) Summary
Webpack Directive Removal
lib/main.ts, lib/sessionManager/stores/expoSecureStore.ts
Removed webpackIgnore: true directives from dynamic import calls. Both files now use standard dynamic import syntax without webpack-specific options. Functional behavior is unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing webpackIgnore from the ExpoSecureStore dynamic import, which is the primary purpose of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the changes, problem being solved, and validation performed, directly corresponding to the code modifications shown.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dtoxvanilla1991 dtoxvanilla1991 self-assigned this May 5, 2026
@dtoxvanilla1991
Copy link
Copy Markdown
Contributor

Will take a look shortly.

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.

Bug: Runtime expo-secure-store error on 0.30.0

3 participants