'Using RTK Query from the umd RTK release
I am using Redux Toolkit (v1.8) from the umd build, as I am using it inside a platform that does not enable package management integration.
I was trying to access RTK Query, but could not find a way to access it through the global exported by the umd script.
I was wondering if:
- I missed something and it's there, or
- It is necessary to use another script, or
- It is not possible to use RTK Query from the umd script
Thanks!
Solution 1:[1]
There is a UMD build at https://unpkg.com/browse/@reduxjs/[email protected]/dist/query/rtk-query.umd.js that will populate window.RTKQ.
Generally you should try to use the ESM build instead - most modern environments should be able to load that unbundled. Any kind of UMD build will probably be removed in RTK 2.0 - it is just not up to date to ship UMD any more.
Just out of curiosity: in what environment are you working? I cannot imagine anything that would work with only an UMD build.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | phry |
