1.1 KiB
UI Kit 1.2.6 — fix CJS/ESM use-query-params import in Next.js
use-query-params can be loaded as a CommonJS module by Node.js when Next.js executes the server-side dependency graph. Named ESM imports from this package may fail at module-link time with:
SyntaxError: The requested module 'use-query-params' does not provide an export named 'QueryParamProvider'.
Both uikit/next-pages-router and uikit/next-app-router now load the module as a namespace and resolve QueryParamProvider through compatible CJS/ESM export layers, as the legacy uikit/core already did.
No destination changes needed: continue using <NextPagesRouter /> (defaults: shallow: true, enableBatching: true). The pages/_app.js file does not need another QueryParamProvider.
The same change is reflected in old uikit/provider/next-{pages,app}-router aliases. The existing adapter resolution, query options, all other providers, and legacy core are unchanged.
This is a targeted compatibility patch built from v1.2.5. Test with actual Next.js runtime before deployment; a full Vite build was not available in this environment.