uikit/ROUTER_QUERY_PARAM_CJS_FIX_1.2.6.md
Mohamadzadeh dd5b513590
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 52s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
uikit-v1.2.6-query-param-provider-cjs-fixed
2026-10-26 15:03:44 +03:30

14 lines
1.1 KiB
Markdown

# 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.