We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
moduleResolution
Node16
NodeNext
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
The import from '@reduxjs/toolkit/query' in the sample below cannot be resolved if the moduleResolution in tsconfig is set to Node16 or NodeNext.
'@reduxjs/toolkit/query'
tsconfig
https://redux-toolkit.js.org/rtk-query/usage/manual-cache-updates#optimistic-updates
Error message is
Cannot find module '@reduxjs/toolkit/query' or its corresponding type declarations.ts(2307)
I think the following exports should be set in package.json.
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/redux-toolkit.esm.js", "require": "./dist/index.js" }, "./query": { "types": "./dist/query/index.d.ts", "import": "./dist/query/rtk-query.esm.js", "require": "./dist/query/index.js" } },
As a side note, at this time it is possible to import from '@reduxjs/toolkit/dist/query' instead, even for Node16 or NodeNext.
The text was updated successfully, but these errors were encountered:
Sorry, this issue was a duplicate of #2485. Withdrawal.
Sorry, something went wrong.
node16
No branches or pull requests
The import from
'@reduxjs/toolkit/query'
in the sample below cannot be resolved if themoduleResolution
intsconfig
is set toNode16
orNodeNext
.https://redux-toolkit.js.org/rtk-query/usage/manual-cache-updates#optimistic-updates
Error message is
I think the following exports should be set in package.json.
As a side note, at this time it is possible to import from '@reduxjs/toolkit/dist/query' instead, even for
Node16
orNodeNext
.The text was updated successfully, but these errors were encountered: