Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-query-client-rn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/clerk-js": patch
---

Fix `useOrganizationList` and other query-based hooks returning empty data on React Native by using `dynamicImportMode: 'eager'` in the native rspack build so dynamic imports resolve synchronously
2 changes: 1 addition & 1 deletion packages/clerk-js/bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{ "path": "./dist/clerk.browser.js", "maxSize": "67KB" },
{ "path": "./dist/clerk.legacy.browser.js", "maxSize": "108KB" },
{ "path": "./dist/clerk.no-rhc.js", "maxSize": "307KB" },
{ "path": "./dist/clerk.native.js", "maxSize": "66KB" },
{ "path": "./dist/clerk.native.js", "maxSize": "545KB" },
{ "path": "./dist/vendors*.js", "maxSize": "7KB" },
{ "path": "./dist/coinbase*.js", "maxSize": "36KB" },
{ "path": "./dist/base-account-sdk*.js", "maxSize": "203KB" },
Expand Down
10 changes: 10 additions & 0 deletions packages/clerk-js/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,20 @@ const prodConfig = ({ mode, env, analysis }) => {
commonForProdChunked(),
// Disable chunking for the native variant, since it's meant to be used in React Native
// where dynamic chunk loading is not supported.
// `dynamicImportMode: 'eager'` inlines all dynamic import() modules directly into the
// bundle and resolves the returned Promise immediately, so rspack's async chunk-loading
// runtime (which doesn't work in Metro) is never emitted.
{
output: {
publicPath: '',
},
module: {
parser: {
javascript: {
dynamicImportMode: 'eager',
},
},
},
optimization: {
splitChunks: false,
},
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading