@elliemae/pui-cli 7.27.0 → 7.27.2
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.
|
@@ -68,5 +68,7 @@ const addRootElement = (id) => {
|
|
|
68
68
|
addRootElement("root");
|
|
69
69
|
(0, import_matchMedia.addMatchMedia)();
|
|
70
70
|
window.ResizeObserver = import_resize_observer_polyfill.default;
|
|
71
|
-
window.emui = {
|
|
72
|
-
|
|
71
|
+
window.emui = {
|
|
72
|
+
logger: (0, import_pui_diagnostics.logger)(),
|
|
73
|
+
_BASE_PATH: new URL(document.baseURI).pathname
|
|
74
|
+
};
|
|
@@ -39,6 +39,7 @@ var import_circular_dependency_plugin = __toESM(require("circular-dependency-plu
|
|
|
39
39
|
var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"), 1);
|
|
40
40
|
var import_react_refresh_webpack_plugin = __toESM(require("@pmmmwh/react-refresh-webpack-plugin"), 1);
|
|
41
41
|
var import_speed_measure_webpack_plugin = __toESM(require("speed-measure-webpack-plugin"), 1);
|
|
42
|
+
var import_express_static_gzip = __toESM(require("express-static-gzip"), 1);
|
|
42
43
|
var import_middlewares = require("../server/middlewares.js");
|
|
43
44
|
var import_app_routes = require("../server/app-routes.cjs");
|
|
44
45
|
var import_helpers = require("./helpers.js");
|
|
@@ -148,6 +149,15 @@ const devConfig = {
|
|
|
148
149
|
setupMiddlewares: (middlewares, devServer) => {
|
|
149
150
|
(0, import_middlewares.setupDefaultMiddlewares)(devServer.app);
|
|
150
151
|
(0, import_app_routes.loadRoutes)(devServer.app);
|
|
152
|
+
const cdnRouter = (0, import_express_static_gzip.default)("cdn");
|
|
153
|
+
devServer.app.use((req, res, next) => {
|
|
154
|
+
const parsedPath = import_node_path.default.parse(req.url);
|
|
155
|
+
if (parsedPath?.ext) {
|
|
156
|
+
cdnRouter(req, res, next);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
next();
|
|
160
|
+
});
|
|
151
161
|
return middlewares;
|
|
152
162
|
}
|
|
153
163
|
}
|
|
@@ -45,5 +45,7 @@ const addRootElement = (id) => {
|
|
|
45
45
|
addRootElement("root");
|
|
46
46
|
addMatchMedia();
|
|
47
47
|
window.ResizeObserver = ResizeObserver;
|
|
48
|
-
window.emui = {
|
|
49
|
-
|
|
48
|
+
window.emui = {
|
|
49
|
+
logger: logger(),
|
|
50
|
+
_BASE_PATH: new URL(document.baseURI).pathname
|
|
51
|
+
};
|
|
@@ -6,6 +6,7 @@ import CircularDependencyPlugin from "circular-dependency-plugin";
|
|
|
6
6
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
7
7
|
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
|
8
8
|
import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
|
|
9
|
+
import expressStaticGzip from "express-static-gzip";
|
|
9
10
|
import { setupDefaultMiddlewares } from "../server/middlewares.js";
|
|
10
11
|
import { loadRoutes } from "../server/app-routes.cjs";
|
|
11
12
|
import {
|
|
@@ -118,6 +119,15 @@ const devConfig = {
|
|
|
118
119
|
setupMiddlewares: (middlewares, devServer) => {
|
|
119
120
|
setupDefaultMiddlewares(devServer.app);
|
|
120
121
|
loadRoutes(devServer.app);
|
|
122
|
+
const cdnRouter = expressStaticGzip("cdn");
|
|
123
|
+
devServer.app.use((req, res, next) => {
|
|
124
|
+
const parsedPath = path.parse(req.url);
|
|
125
|
+
if (parsedPath?.ext) {
|
|
126
|
+
cdnRouter(req, res, next);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
next();
|
|
130
|
+
});
|
|
121
131
|
return middlewares;
|
|
122
132
|
}
|
|
123
133
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "7.27.
|
|
3
|
+
"version": "7.27.2",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"eslint-import-resolver-babel-module": "~5.3.2",
|
|
164
164
|
"eslint-import-resolver-typescript": "~3.5.3",
|
|
165
165
|
"eslint-import-resolver-webpack": "~0.13.2",
|
|
166
|
-
"eslint-plugin-compat": "~4.1.
|
|
166
|
+
"eslint-plugin-compat": "~4.1.1",
|
|
167
167
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
168
168
|
"eslint-plugin-import": "~2.27.5",
|
|
169
169
|
"eslint-plugin-jest": "~27.2.1",
|
|
@@ -214,8 +214,8 @@
|
|
|
214
214
|
"node-plop": "~0.31.1",
|
|
215
215
|
"nodemon": "~2.0.20",
|
|
216
216
|
"normalize-path": "~3.0.0",
|
|
217
|
-
"npm-check-updates": "16.
|
|
218
|
-
"pino": "~8.
|
|
217
|
+
"npm-check-updates": "16.7.2",
|
|
218
|
+
"pino": "~8.10.0",
|
|
219
219
|
"pino-pretty": "~9.1.1",
|
|
220
220
|
"plop": "~3.1.2",
|
|
221
221
|
"postcss": "~8.4.21",
|