feat: replace qs with qs-esm (#6966)
qs-esm is a qs fork I created and doesn't add bloated polyfills, is ESM-only, has a smaller bundle size and comes with types included. qs: https://bundlephobia.com/package/qs@6.12.1 (11kb) https://npm.anvaka.com/#/view/2d/qs (15 dependencies) qs-esm: https://bundlephobia.com/package/qs-esm@7.0.0 (4.2kb) https://npm.anvaka.com/#/view/2d/qs-esm (1 dependency) I don't agree with the backwards philosophy of qs: https://github.com/ljharb/qs/issues/404#issuecomment-806392831 ("more deps is better", lower bundle size as opt-in, maximum environment compatibility as opt-out) qs imports waaay too many useless dependencies
This commit is contained in:
@@ -5,7 +5,7 @@ import { initI18n } from '@payloadcms/translations'
|
||||
import { findLocaleFromCode } from '@payloadcms/ui/shared'
|
||||
import { headers as getHeaders } from 'next/headers.js'
|
||||
import { createLocalReq, isEntityHidden, parseCookies } from 'payload'
|
||||
import qs from 'qs'
|
||||
import * as qs from 'qs-esm'
|
||||
|
||||
import type { Args } from './types.js'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user