@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
74 lines • 3.31 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.rootReducer = exports.replykeStore = exports.store = void 0;
const toolkit_1 = require("@reduxjs/toolkit");
const rootReducer_1 = require("./rootReducer");
const middleware_1 = require("./middleware");
const baseApi_1 = require("./api/baseApi");
const env_1 = require("../utils/env");
// Configure the Redux store
exports.store = (0, toolkit_1.configureStore)({
reducer: rootReducer_1.rootReducer,
middleware: (getDefaultMiddleware) => 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
'replykeApi',
'appNotificationsApi',
],
},
})
// Add RTK Query middleware
.concat(baseApi_1.baseApi.middleware)
// Add custom middleware
.concat(middleware_1.customMiddleware),
// Enable Redux DevTools in development
devTools: !(0, env_1.isProduction)(),
});
exports.replykeStore = exports.store;
// Export for advanced users who need direct access
var rootReducer_2 = require("./rootReducer");
Object.defineProperty(exports, "rootReducer", { enumerable: true, get: function () { return rootReducer_2.rootReducer; } });
__exportStar(require("./types"), exports);
__exportStar(require("./hooks"), exports);
// Integration mode exports (for users with their own Redux store)
__exportStar(require("./integration"), exports);
//# sourceMappingURL=index.js.map