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:
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import qs from 'qs'
|
||||
import * as qs from 'qs-esm'
|
||||
import React, { Fragment, useCallback, useEffect, useRef, useState } from 'react'
|
||||
|
||||
import type { Post } from '../../../../../payload-types.js'
|
||||
|
||||
Reference in New Issue
Block a user