-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUNNING attempts at getting TS version selection working #1013
RUNNING attempts at getting TS version selection working #1013
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d2aaff0:
|
Size Change: -2 B (0%) Total Size: 84.4 kB
ℹ️ View Unchanged
|
Per Orta at https://twitter.com/orta/status/1385610364323237889 :
So, will have to figure out a way around that. Per @phryneas at https://twitter.com/phry/status/1385618747810095111 :
|
- Removed useless buildSelectors import - Set platform to "neutral" to preserve process.env.NODE_ENV - Re-enabled import-related settings to fix "module not resolved"
After several more hours of hacking, this appears to be working! Lenz suggested that what we really needed was a I reworked the packaging and build setup to have that. I've been using a standalone copy of the RTKQ React example app as my testbed. Ran into some more issues with TSC not handling I've seen TS 4.0 correctly parse The resulting bundle looks like this: That looks basically as I'd expect it: both RTK and RTKQ in the bundle, ESM format, seemingly valid sizes. I did have to revert the earlier I also bumped ESBuild to latest just because. This actually caused problems because it now replaces I think this basically wraps up the actual code integration aspect, and we can now work on integrating the docs. |
VERY WORKING MUCH QUERY SUCH VERSIONING
This is a completely failing attempt to get TS4.0 compat working, by creating a clone of
query/react/index.d.ts
namedindexTs40.d.ts
, swapping an import, and getting TStypesVersions
detection working.This is really built off of #1012 , so it's got all the changes there in terms of test updates, plus some reworking of the
src/query/react/
files that probably shoulda been over here.I've been using
--traceResolution
, and I can see TSC finding thetypesVersion
field indist/query/react/package.json
... and then it just seems to ignore it. If I have atypes
field in there, it settles on that no matter what the version check is. If I don't have atypes
field, it ends up latching on tomain
and deriving anindex.d.ts
from that.Frankly I have no idea what the path mappings in
typesVersions
are supposed to be. Individual filenames? Paths relative to repo root? Paths relative to this folder? Noooo idea.