@elliemae/pui-app-sdk 2.21.3 → 2.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,8 @@ var _reduxSaga = _interopRequireDefault(require("redux-saga"));
17
17
 
18
18
  var _reducers = require("./reducers.js");
19
19
 
20
+ var _webpackHmr = require("./webpack-hmr.js");
21
+
20
22
  /* eslint-disable max-params */
21
23
  const rootReducer = (0, _reducers.createReducer)();
22
24
  // global variable
@@ -53,22 +55,8 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
53
55
  // @ts-ignore
54
56
  preloadedState: initialState,
55
57
  enhancers
56
- }); // let hotModule = null;
57
- // try {
58
- // hotModule = module?.hot;
59
- // } catch (err) {
60
- // // eslint-disable-next-line @typescript-eslint/ban-ts-comment
61
- // // @ts-ignore
62
- // // block:start
63
- // hotModule = import.meta?.webpackHot;
64
- // // block:end
65
- // }
66
- // if (hotModule) {
67
- // hotModule.accept('./reducers', () => {
68
- // forceReducerReload(baseStore);
69
- // });
70
- // }
71
-
58
+ });
59
+ (0, _webpackHmr.enableHotReloading)(baseStore);
72
60
  return baseStore;
73
61
  };
74
62
 
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.enableHotReloading = void 0;
7
+
8
+ var _reduxInjectors = require("redux-injectors");
9
+
10
+ // eslint-disable-next-line @typescript-eslint/ban-types
11
+ const enableHotReloading = baseStore => {
12
+ let hotModule = null;
13
+
14
+ try {
15
+ var _module;
16
+
17
+ hotModule = (_module = module) === null || _module === void 0 ? void 0 : _module.hot;
18
+ } catch (err) {
19
+ var _import$meta;
20
+
21
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
+ // @ts-ignore
23
+ hotModule = (_import$meta = import.meta) === null || _import$meta === void 0 ? void 0 : _import$meta.webpackHot;
24
+ }
25
+
26
+ if (hotModule) {
27
+ hotModule.accept('./reducers', () => {
28
+ (0, _reduxInjectors.forceReducerReload)(baseStore);
29
+ });
30
+ }
31
+ };
32
+
33
+ exports.enableHotReloading = enableHotReloading;
@@ -4,6 +4,7 @@ import { createInjectorsEnhancer } from 'redux-injectors';
4
4
  import { routerMiddleware } from 'connected-react-router';
5
5
  import createSagaMiddleware from 'redux-saga';
6
6
  import { createReducer } from "./reducers.js";
7
+ import { enableHotReloading } from "./webpack-hmr.js";
7
8
  const rootReducer = createReducer();
8
9
  // global variable
9
10
  let appStore = null;
@@ -33,22 +34,8 @@ const createStore = (initialState, sagaMiddleware, history, middlewareConfig = {
33
34
  // @ts-ignore
34
35
  preloadedState: initialState,
35
36
  enhancers
36
- }); // let hotModule = null;
37
- // try {
38
- // hotModule = module?.hot;
39
- // } catch (err) {
40
- // // eslint-disable-next-line @typescript-eslint/ban-ts-comment
41
- // // @ts-ignore
42
- // // block:start
43
- // hotModule = import.meta?.webpackHot;
44
- // // block:end
45
- // }
46
- // if (hotModule) {
47
- // hotModule.accept('./reducers', () => {
48
- // forceReducerReload(baseStore);
49
- // });
50
- // }
51
-
37
+ });
38
+ enableHotReloading(baseStore);
52
39
  return baseStore;
53
40
  };
54
41
 
@@ -0,0 +1,23 @@
1
+ import { forceReducerReload } from 'redux-injectors'; // eslint-disable-next-line @typescript-eslint/ban-types
2
+
3
+ export const enableHotReloading = baseStore => {
4
+ let hotModule = null;
5
+
6
+ try {
7
+ var _module;
8
+
9
+ hotModule = (_module = module) === null || _module === void 0 ? void 0 : _module.hot;
10
+ } catch (err) {
11
+ var _import$meta;
12
+
13
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14
+ // @ts-ignore
15
+ hotModule = (_import$meta = import.meta) === null || _import$meta === void 0 ? void 0 : _import$meta.webpackHot;
16
+ }
17
+
18
+ if (hotModule) {
19
+ hotModule.accept('./reducers', () => {
20
+ forceReducerReload(baseStore);
21
+ });
22
+ }
23
+ };
@@ -0,0 +1 @@
1
+ export declare const enableHotReloading: (baseStore: {}) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "2.21.3",
3
+ "version": "2.21.4",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",
@@ -115,7 +115,7 @@
115
115
  "@elliemae/ds-popperjs": "~2.2.2",
116
116
  "@elliemae/ds-toast": "~2.2.2",
117
117
  "@elliemae/em-ssf-guest": "~1.11.1",
118
- "@elliemae/pui-cli": "~5.25.2",
118
+ "@elliemae/pui-cli": "~5.26.2",
119
119
  "@elliemae/pui-diagnostics": "~2.7.3",
120
120
  "@elliemae/pui-e2e-test-sdk": "~6.10.0",
121
121
  "@elliemae/pui-micro-frontend-base": "~1.10.1",