How to use Qs on traditional pages

because ie11 is not compatible with URLSearchParams, this api uses the form of introducing third-party plug-ins or solves the problem of non-ie11 compatibility, so I intend to try it with qs.
but because it is a traditional multi-page project, it is not packaged through webpack. How can I use the qs.
page code as follows: `

    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="../lib/validate.js"></script>
    <script src="../res/js/app.js"></script>
    <script src="../lib/params.js" ></script>`

is the

quoted in the above way.
Aug.18,2021

two schemes:

  1. find a package on the Internet that supports the introduction of js files and exposes global objects
  2. use a simple function with regular encapsulation by yourself

if you want the code of the second way, I'll write it to you this afternoon (to achieve better by myself, I also like to ask this question during the interview, so I can practice)


what's the difference between not using webpack and using qs?


https://github.com/ljharb/qs/. finds the git, of qs and uses qs.js
or
URLSearchParams under dist to have the corresponding polyfill, https://github.com/jerrybendy..
both can be used


how do you solve it? I'm still working overtime. If I can't handle it tomorrow, it will be cool

.
Menu