UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

56 lines 2.32 kB
import { configureStore } from "@reduxjs/toolkit"; import { rootReducer } from "./rootReducer"; import { customMiddleware } from "./middleware"; import { baseApi } from "./api/baseApi"; import { isProduction } from "../utils/env"; // Configure the Redux store export var store = configureStore({ reducer: rootReducer, middleware: function (getDefaultMiddleware) { return getDefaultMiddleware({ serializableCheck: { // Ignore these action types for serializable check ignoredActions: [ 'persist/PERSIST', 'persist/REHYDRATE', // RTK Query actions that might contain functions 'appNotificationsApi/executeQuery/pending', 'appNotificationsApi/executeQuery/fulfilled', 'appNotificationsApi/executeQuery/rejected', 'appNotificationsApi/executeMutation/pending', 'appNotificationsApi/executeMutation/fulfilled', 'appNotificationsApi/executeMutation/rejected', ], // Ignore these field paths in all actions ignoredActionsPaths: [ 'meta.arg', 'payload.timestamp', // RTK Query meta fields that may contain functions 'meta.baseQueryMeta', 'meta.arg.originalArgs', 'meta.arg.endpointName', 'payload.meta', ], // Ignore these paths in the state ignoredPaths: [ 'items.dates', // RTK Query state paths that may contain functions/metadata 'api', 'appNotificationsApi', ], }, }) // Add RTK Query middleware .concat(baseApi.middleware) // Add custom middleware .concat(customMiddleware); }, // Enable Redux DevTools in development devTools: !isProduction(), }); // Export store for provider export { store as replykeStore }; // Export for advanced users who need direct access export { rootReducer } from "./rootReducer"; export * from "./types"; //# sourceMappingURL=index.js.map