text: import reduxLogger from "redux-logger";
  import { init } from "@rematch/core";
  import createLoadingPlugin from "@rematch/loading";
  import createSelectPlugin from "@rematch/select";
  import * as models from "./models";
  
  // redux中间件
  const reduxMiddlewares = [];
  
  // 只在开发环境时使用redux-logger
  if (process.env.NODE_ENV === "development") {
    reduxMiddlewares.push(reduxLogger);
  }
  
  // rematch插件
  const rematchPlugins = [];
  
  // 使用 rematch-loading 和 rematch-select插件
  rematchPlugins.push(
    createLoadingPlugin({ name: "loading" }),
    createSelectPlugin()
  );
  
  // 初始化redux store
  const store = init({
    name: "全局store",
    models,
    plugins: rematchPlugins,
    redux: {
      middlewares: reduxMiddlewares,
    },
  });
  
  export default store;
  