mirror of
https://github.com/plankanban/planka.git
synced 2025-12-23 17:25:16 +03:00
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { applyMiddleware, legacy_createStore as createStore, compose as reduxCompose } from 'redux';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
import { createRouterMiddleware } from './lib/redux-router';
|
||||
@@ -7,14 +12,11 @@ import rootSaga from './sagas';
|
||||
import history from './history';
|
||||
|
||||
const sagaMiddleware = createSagaMiddleware();
|
||||
|
||||
const middlewares = [sagaMiddleware, createRouterMiddleware(history)];
|
||||
|
||||
let compose = reduxCompose;
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { logger } = require('redux-logger'); // eslint-disable-line global-require
|
||||
middlewares.push(logger);
|
||||
if (import.meta.env.DEV) {
|
||||
middlewares.push(require('redux-logger')); // eslint-disable-line global-require
|
||||
|
||||
// Enable Redux Devtools in development
|
||||
// https://github.com/zalmoxisus/redux-devtools-extension
|
||||
|
||||
Reference in New Issue
Block a user