You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just tried to setup RTK with Astro using the most basic setup.
It looks to me that the 2.0 Alpha version is still not generating valid ESM modules. This is way beyond my knowledge.
It's worth nothing that import the base query version works, just not the React one.
@BorjaRafolsMartinez Well, the first issue is that import query isn't a valid way to use RTKQ :) We aren't trying to do a default export - it's all named exports.
What happens if you do import { createApi } from in both entry point names?
(although I'll agree it's odd that one entry point returns a default object and the other doesn't.)
Sorry about that, I used default export for debugging purposes: import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query' [Function: baseCreateApi]
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' error Cannot read properties of undefined (reading 'createApi')
Just tried to setup RTK with Astro using the most basic setup.
It looks to me that the 2.0 Alpha version is still not generating valid ESM modules. This is way beyond my knowledge.
It's worth nothing that import the base query version works, just not the React one.
import query from '@reduxjs/toolkit/query'
import query from '@reduxjs/toolkit/query/react'
undefined
I pushed it to a repo here: https://github.com/BorjaRafolsMartinez/astro-react-rtk
I believe this is part of what you want to achieve on 2.0. Let me know if I can help.
The text was updated successfully, but these errors were encountered: