@elliemae/pui-cli 9.0.0-next.3 → 9.0.0-next.30
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.
- package/dist/cjs/commands/lint.js +26 -7
- package/dist/cjs/commands/start.js +1 -1
- package/dist/cjs/commands/storybook.js +2 -2
- package/dist/cjs/commands/test.js +49 -22
- package/dist/cjs/commands/utils.js +30 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/lint-config/eslint/common.cjs +3 -2
- package/dist/cjs/lint-config/eslint/typescript/common.cjs +3 -3
- package/dist/cjs/lint-config/stylelint.config.cjs +14 -13
- package/dist/cjs/monorepo/delete-merged-tags.js +1 -1
- package/dist/cjs/monorepo/set-registry-version.js +1 -1
- package/dist/cjs/monorepo/set-workspace-version.js +1 -1
- package/dist/cjs/server/csp.js +2 -1
- package/dist/cjs/server/index.js +5 -0
- package/dist/cjs/server/utils.js +11 -4
- package/dist/cjs/server/wsServer.js +129 -0
- package/dist/cjs/testing/ExtendedJSDomEnv.cjs +27 -0
- package/dist/cjs/testing/extended/axe-core/getMessageAndPass.js +37 -0
- package/dist/cjs/testing/extended/axe-core/index.js +24 -0
- package/dist/cjs/testing/extended/axe-core/reporter.js +51 -0
- package/dist/cjs/testing/extended/axe-core/shouldIgnoreNodeViolation.js +31 -0
- package/dist/cjs/testing/extended/axe-core/toHaveNoViolations.js +43 -0
- package/dist/cjs/testing/jest.config.cjs +5 -2
- package/dist/cjs/testing/jest.polyfills.cjs +28 -0
- package/dist/cjs/testing/setup-test-env.js +0 -2
- package/dist/cjs/testing/setup-tests.js +25 -4
- package/dist/cjs/testing/vitest.config.js +8 -8
- package/dist/cjs/transpile/esbuild.js +1 -1
- package/dist/cjs/update-notifier.js +1 -1
- package/dist/cjs/utils.js +1 -1
- package/dist/cjs/webpack/helpers.js +18 -6
- package/dist/cjs/webpack/webpack.base.babel.js +7 -4
- package/dist/cjs/webpack/webpack.dev.babel.js +14 -3
- package/dist/cjs/webpack/webpack.lib.base.babel.js +13 -5
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +5 -11
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +4 -5
- package/dist/cjs/webpack/webpack.prod.babel.js +3 -2
- package/dist/cjs/webpack/webpack.storybook.js +10 -11
- package/dist/esm/commands/lint.js +27 -7
- package/dist/esm/commands/start.js +1 -1
- package/dist/esm/commands/storybook.js +2 -2
- package/dist/esm/commands/test.js +49 -22
- package/dist/esm/commands/utils.js +30 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/lint-config/eslint/common.cjs +3 -2
- package/dist/esm/lint-config/eslint/typescript/common.cjs +3 -3
- package/dist/esm/lint-config/stylelint.config.cjs +14 -13
- package/dist/esm/monorepo/delete-merged-tags.js +1 -1
- package/dist/esm/monorepo/set-registry-version.js +1 -1
- package/dist/esm/monorepo/set-workspace-version.js +1 -1
- package/dist/esm/server/csp.js +2 -1
- package/dist/esm/server/index.js +6 -1
- package/dist/esm/server/utils.js +11 -4
- package/dist/esm/server/wsServer.js +99 -0
- package/dist/esm/testing/ExtendedJSDomEnv.cjs +27 -0
- package/dist/esm/testing/extended/axe-core/getMessageAndPass.js +17 -0
- package/dist/esm/testing/extended/axe-core/index.js +4 -0
- package/dist/esm/testing/extended/axe-core/reporter.js +31 -0
- package/dist/esm/testing/extended/axe-core/shouldIgnoreNodeViolation.js +11 -0
- package/dist/esm/testing/extended/axe-core/toHaveNoViolations.js +23 -0
- package/dist/esm/testing/jest.config.cjs +5 -2
- package/dist/esm/testing/jest.polyfills.cjs +28 -0
- package/dist/esm/testing/setup-test-env.js +0 -2
- package/dist/esm/testing/setup-tests.js +25 -4
- package/dist/esm/testing/vitest.config.js +8 -8
- package/dist/esm/transpile/esbuild.js +1 -1
- package/dist/esm/update-notifier.js +1 -1
- package/dist/esm/utils.js +1 -1
- package/dist/esm/webpack/helpers.js +18 -6
- package/dist/esm/webpack/webpack.base.babel.js +7 -4
- package/dist/esm/webpack/webpack.dev.babel.js +14 -3
- package/dist/esm/webpack/webpack.lib.base.babel.js +13 -5
- package/dist/esm/webpack/webpack.lib.dev.babel.js +6 -12
- package/dist/esm/webpack/webpack.lib.prod.babel.js +9 -6
- package/dist/esm/webpack/webpack.prod.babel.js +3 -2
- package/dist/esm/webpack/webpack.storybook.js +11 -12
- package/dist/types/babel.config.d.cts +7 -7
- package/dist/types/commands/build.d.ts +2 -2
- package/dist/types/commands/codemod.d.ts +2 -2
- package/dist/types/commands/lint.d.ts +3 -2
- package/dist/types/commands/pack.d.ts +2 -2
- package/dist/types/commands/start.d.ts +2 -2
- package/dist/types/commands/storybook.d.ts +2 -2
- package/dist/types/commands/test.d.ts +4 -2
- package/dist/types/commands/tscheck.d.ts +2 -2
- package/dist/types/commands/utils.d.ts +23 -1
- package/dist/types/commands/version.d.ts +2 -2
- package/dist/types/commands/vitest.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lint-config/commitlint.config.d.cts +1 -1
- package/dist/types/lint-config/eslint/common.d.cts +18 -12
- package/dist/types/lint-config/eslint/non-react.d.cts +8 -1
- package/dist/types/lint-config/eslint/react.d.cts +8 -1
- package/dist/types/lint-config/eslint/typescript/common.d.cts +6 -6
- package/dist/types/lint-config/eslint/typescript/non-react.d.cts +9 -2
- package/dist/types/lint-config/eslint/typescript/react.d.cts +9 -2
- package/dist/types/lint-config/lint-staged.config.d.ts +3 -3
- package/dist/types/lint-config/prettier.config.d.cts +6 -6
- package/dist/types/lint-config/stylelint.config.d.cts +6 -6
- package/dist/types/release.config.d.cts +2 -2
- package/dist/types/server/csp.d.ts +2 -2
- package/dist/types/server/utils.d.ts +1 -0
- package/dist/types/server/wsServer.d.ts +13 -0
- package/dist/types/testing/ExtendedJSDomEnv.d.cts +5 -0
- package/dist/types/testing/extended/axe-core/getMessageAndPass.d.ts +8 -0
- package/dist/types/testing/extended/axe-core/index.d.ts +1 -0
- package/dist/types/testing/extended/axe-core/reporter.d.ts +2 -0
- package/dist/types/testing/extended/axe-core/shouldIgnoreNodeViolation.d.ts +2 -0
- package/dist/types/testing/extended/axe-core/toHaveNoViolations.d.ts +12 -0
- package/dist/types/testing/jest.config.d.cts +25 -22
- package/dist/types/testing/jest.node.config.d.cts +3 -0
- package/dist/types/testing/jest.polyfills.d.cts +1 -0
- package/dist/types/testing/mocks/axios.d.ts +7 -7
- package/dist/types/testing/mocks/pui-diagnostics.d.ts +13 -13
- package/dist/types/testing/vitest.config.d.ts +1 -1
- package/dist/types/tests/basic.test.d.ts +0 -0
- package/dist/types/transpile/esbuild.d.ts +3 -3
- package/dist/types/typedoc.d.cts +3 -3
- package/dist/types/webpack/helpers.d.ts +4 -1
- package/dist/types/webpack/webpack.storybook.d.ts +0 -1
- package/nx.json +97 -0
- package/package.json +163 -150
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var reporter_exports = {};
|
|
20
|
+
__export(reporter_exports, {
|
|
21
|
+
reporter: () => reporter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(reporter_exports);
|
|
24
|
+
var import_jest_matcher_utils = require("jest-matcher-utils");
|
|
25
|
+
const colorYellow = (arg) => `\x1B[93m ${arg ?? ""} \x1B[0m`;
|
|
26
|
+
const colorGrey = (arg) => `\x1B[90m ${arg ?? ""} \x1B[0m`;
|
|
27
|
+
const colorBlue = (arg) => `\x1B[34m ${arg ?? ""} \x1B[0m`;
|
|
28
|
+
const reporter = (violToFormat) => {
|
|
29
|
+
if (violToFormat.length === 0)
|
|
30
|
+
return "";
|
|
31
|
+
const lineBreak = "\n\n";
|
|
32
|
+
const horizontalLine = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
33
|
+
return violToFormat.map((violation) => {
|
|
34
|
+
const errorBody = violation.nodes.map((node) => {
|
|
35
|
+
const selector = node.target.join(", ");
|
|
36
|
+
const expectedText = `Expected the HTML found at $('${selector}') to have no violations:${lineBreak}`;
|
|
37
|
+
let violationHelpUrl = "";
|
|
38
|
+
if (violation.helpUrl)
|
|
39
|
+
violationHelpUrl = `You can find more information on this issue here:
|
|
40
|
+
${colorBlue(
|
|
41
|
+
violation.helpUrl
|
|
42
|
+
)}`;
|
|
43
|
+
return `${expectedText + colorGrey(node.html) + lineBreak}Received:${lineBreak}${(0, import_jest_matcher_utils.printReceived)(
|
|
44
|
+
`${violation.help} (${violation.id})`
|
|
45
|
+
)}${lineBreak}${colorYellow(
|
|
46
|
+
node.failureSummary
|
|
47
|
+
)}${lineBreak}${violationHelpUrl}`;
|
|
48
|
+
}).join(lineBreak);
|
|
49
|
+
return errorBody;
|
|
50
|
+
}).join(lineBreak + horizontalLine + lineBreak);
|
|
51
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var shouldIgnoreNodeViolation_exports = {};
|
|
20
|
+
__export(shouldIgnoreNodeViolation_exports, {
|
|
21
|
+
shouldIgnoreNodeViolation: () => shouldIgnoreNodeViolation
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(shouldIgnoreNodeViolation_exports);
|
|
24
|
+
const dataAttributeRegexp = /(data-[\S]*)=["']([\S]*)["']/gm;
|
|
25
|
+
const shouldIgnoreNodeViolation = (node, violation) => [...node.html.matchAll(dataAttributeRegexp)].map(([fullMatch, dataKey, dataValue]) => ({
|
|
26
|
+
fullMatch,
|
|
27
|
+
dataKey,
|
|
28
|
+
dataValue
|
|
29
|
+
})).some(
|
|
30
|
+
({ dataKey, dataValue }) => dataKey === `data-axe-ignore-${violation.id}` && dataValue === "true"
|
|
31
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var toHaveNoViolations_exports = {};
|
|
20
|
+
__export(toHaveNoViolations_exports, {
|
|
21
|
+
toHaveNoViolations: () => toHaveNoViolations
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(toHaveNoViolations_exports);
|
|
24
|
+
var import_getMessageAndPass = require("./getMessageAndPass.js");
|
|
25
|
+
var import_shouldIgnoreNodeViolation = require("./shouldIgnoreNodeViolation.js");
|
|
26
|
+
const toHaveNoViolations = {
|
|
27
|
+
toHaveNoViolations(results) {
|
|
28
|
+
const { violations } = results;
|
|
29
|
+
const finalViolations = [];
|
|
30
|
+
violations.forEach((violation) => {
|
|
31
|
+
const { nodes } = violation;
|
|
32
|
+
const newNodes = [];
|
|
33
|
+
nodes.forEach((node) => {
|
|
34
|
+
if (!(0, import_shouldIgnoreNodeViolation.shouldIgnoreNodeViolation)(node, violation))
|
|
35
|
+
newNodes.push(node);
|
|
36
|
+
});
|
|
37
|
+
if (newNodes.length > 0) {
|
|
38
|
+
finalViolations.push({ ...violation, nodes: newNodes });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return { actual: violations, ...(0, import_getMessageAndPass.getMessageAndPass)(finalViolations) };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
@@ -57,6 +57,8 @@ const jestConfig = {
|
|
|
57
57
|
coverageReporters: ['lcov', 'html', 'text-summary'],
|
|
58
58
|
moduleDirectories: ['node_modules', 'app', 'lib'],
|
|
59
59
|
moduleNameMapper: {
|
|
60
|
+
d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
|
|
61
|
+
'^d3-(.*)$': '<rootDir>/node_modules/d3-$1/dist/d3-$1.min.js',
|
|
60
62
|
'.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.js'),
|
|
61
63
|
'.*\\.(css|scss)$': getMockFilePath('cssModule.js'),
|
|
62
64
|
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
|
|
@@ -73,7 +75,7 @@ const jestConfig = {
|
|
|
73
75
|
},
|
|
74
76
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
75
77
|
setupFilesAfterEnv: [path.resolve(__dirname, './setup-tests.js')],
|
|
76
|
-
setupFiles: ['raf/polyfill', '
|
|
78
|
+
setupFiles: ['raf/polyfill', path.resolve(__dirname, './jest.polyfills.cjs')],
|
|
77
79
|
testRegex: '(app|lib).*/tests/.*\\.test\\.[jt]sx?$',
|
|
78
80
|
snapshotSerializers: [],
|
|
79
81
|
testResultsProcessor: 'jest-sonar-reporter',
|
|
@@ -91,8 +93,9 @@ const jestConfig = {
|
|
|
91
93
|
testEnvironmentOptions: {
|
|
92
94
|
url: `http://localhost:3111${basePath}`,
|
|
93
95
|
resources: 'usable',
|
|
96
|
+
customExportConditions: [''],
|
|
94
97
|
},
|
|
95
|
-
testEnvironment: '
|
|
98
|
+
testEnvironment: path.resolve(__dirname, './ExtendedJSDomEnv.cjs'),
|
|
96
99
|
watchPlugins: [
|
|
97
100
|
'jest-watch-typeahead/filename',
|
|
98
101
|
'jest-watch-typeahead/testname',
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @note The block below contains polyfills for Node.js globals
|
|
3
|
+
* required for Jest to function when running JSDOM tests.
|
|
4
|
+
* These HAVE to be require's and HAVE to be in this exact
|
|
5
|
+
* order, since "undici" depends on the "TextEncoder" global API.
|
|
6
|
+
*
|
|
7
|
+
* Consider migrating to a more modern test runner if
|
|
8
|
+
* you don't want to deal with this.
|
|
9
|
+
*/
|
|
10
|
+
const { TextDecoder, TextEncoder } = require('node:util');
|
|
11
|
+
|
|
12
|
+
Object.defineProperties(globalThis, {
|
|
13
|
+
TextDecoder: { value: TextDecoder },
|
|
14
|
+
TextEncoder: { value: TextEncoder },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const { Blob, File } = require('node:buffer');
|
|
18
|
+
const { fetch, Headers, FormData, Request, Response } = require('undici');
|
|
19
|
+
|
|
20
|
+
Object.defineProperties(globalThis, {
|
|
21
|
+
fetch: { value: fetch, writable: true },
|
|
22
|
+
Blob: { value: Blob },
|
|
23
|
+
File: { value: File },
|
|
24
|
+
Headers: { value: Headers },
|
|
25
|
+
FormData: { value: FormData },
|
|
26
|
+
Request: { value: Request },
|
|
27
|
+
Response: { value: Response },
|
|
28
|
+
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var import_vitest = require("vitest");
|
|
3
|
-
var import_jest_styled_components = require("jest-styled-components");
|
|
4
3
|
var import_react = require("@testing-library/react");
|
|
5
|
-
var import_extend_expect = require("@testing-library/jest-dom/extend-expect");
|
|
6
4
|
(0, import_vitest.afterEach)(() => {
|
|
7
5
|
(0, import_react.cleanup)();
|
|
8
6
|
});
|
|
@@ -21,11 +21,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
var import_stable = require("core-js/stable");
|
|
25
24
|
var import_runtime = require("regenerator-runtime/runtime");
|
|
26
|
-
var
|
|
27
|
-
var import_jest_axe = __toESM(require("jest-axe"), 1);
|
|
25
|
+
var import_jest_globals = require("@testing-library/jest-dom/jest-globals");
|
|
28
26
|
var import_resize_observer_polyfill = __toESM(require("resize-observer-polyfill"), 1);
|
|
27
|
+
var import_axe_core = require("./extended/axe-core");
|
|
29
28
|
var import_matchMedia = require("./mocks/matchMedia.js");
|
|
30
29
|
var import_pui_diagnostics = require("./mocks/pui-diagnostics.js");
|
|
31
30
|
const originalError = console.error;
|
|
@@ -48,7 +47,7 @@ console.error = (...args) => {
|
|
|
48
47
|
return originalError(...args);
|
|
49
48
|
};
|
|
50
49
|
if (expect)
|
|
51
|
-
expect.extend(
|
|
50
|
+
expect.extend(import_axe_core.toHaveNoViolations);
|
|
52
51
|
const addElementToBody = (element) => {
|
|
53
52
|
const documentEle = (window || {}).document;
|
|
54
53
|
if (!documentEle)
|
|
@@ -72,3 +71,25 @@ window.emui = {
|
|
|
72
71
|
logger: (0, import_pui_diagnostics.logger)(),
|
|
73
72
|
_BASE_PATH: new URL(document.baseURI).pathname
|
|
74
73
|
};
|
|
74
|
+
let showCorejsWarn = false;
|
|
75
|
+
afterAll(() => {
|
|
76
|
+
if (showCorejsWarn) {
|
|
77
|
+
console.warn(
|
|
78
|
+
`IMPORTANT: Try importing core-js/stable in your failed test files and retrying.
|
|
79
|
+
Some tests might have failed because of it`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const originalTest = global.test;
|
|
84
|
+
global.it = (name, fn, timeout = void 0) => {
|
|
85
|
+
const fnWrapper = async () => {
|
|
86
|
+
try {
|
|
87
|
+
await fn();
|
|
88
|
+
} catch (error) {
|
|
89
|
+
showCorejsWarn = true;
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
originalTest(name, fnWrapper, timeout);
|
|
94
|
+
};
|
|
95
|
+
global.it.skip = originalTest.skip;
|
|
@@ -35,27 +35,27 @@ var import_node_path = __toESM(require("node:path"), 1);
|
|
|
35
35
|
var import_node_url = require("node:url");
|
|
36
36
|
var import_config = require("vitest/config");
|
|
37
37
|
var import_plugin_react = __toESM(require("@vitejs/plugin-react"), 1);
|
|
38
|
+
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1);
|
|
38
39
|
const import_meta = {};
|
|
39
40
|
const __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
40
41
|
const vitestConfig = (0, import_config.defineConfig)({
|
|
41
|
-
plugins: [(0, import_plugin_react.default)()],
|
|
42
|
+
plugins: [(0, import_plugin_react.default)(), (0, import_vite_tsconfig_paths.default)()],
|
|
42
43
|
test: {
|
|
43
44
|
globals: true,
|
|
44
45
|
root: process.cwd(),
|
|
45
|
-
environment: "
|
|
46
|
+
environment: "happy-dom",
|
|
46
47
|
setupFiles: [import_node_path.default.resolve(__dirname, "./setup-test-env.js")],
|
|
47
48
|
include: ["./{app,lib}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
48
49
|
exclude: [...import_config.configDefaults.exclude, ".idea", ".git", ".cache", "e2e"],
|
|
49
|
-
// watchIgnore: [
|
|
50
|
-
// '.*\\/node_modules\\/.*',
|
|
51
|
-
// '.*\\/build\\/.*',
|
|
52
|
-
// '.*\\/dist\\/.*',
|
|
53
|
-
// ],
|
|
54
50
|
coverage: {
|
|
55
51
|
reportsDirectory: "./reports/coverage"
|
|
56
52
|
},
|
|
57
53
|
deps: {
|
|
58
|
-
|
|
54
|
+
optimizer: {
|
|
55
|
+
web: {
|
|
56
|
+
include: ["app.config.json", "@elliemae/pui-app-sdk"]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
});
|
|
@@ -34,9 +34,9 @@ __export(esbuild_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(esbuild_exports);
|
|
35
35
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
36
|
var import_node_url = require("node:url");
|
|
37
|
+
var import_promises = require("node:fs/promises");
|
|
37
38
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
38
39
|
var import_esbuild = require("esbuild");
|
|
39
|
-
var import_promises = require("node:fs/promises");
|
|
40
40
|
var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"), 1);
|
|
41
41
|
var import_esbuild_plugin_lodash = __toESM(require("esbuild-plugin-lodash"), 1);
|
|
42
42
|
const import_meta = {};
|
|
@@ -31,9 +31,9 @@ __export(update_notifier_exports, {
|
|
|
31
31
|
notifyUpdates: () => notifyUpdates
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(update_notifier_exports);
|
|
34
|
-
var import_update_notifier = __toESM(require("update-notifier"), 1);
|
|
35
34
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
35
|
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
36
|
+
var import_update_notifier = __toESM(require("update-notifier"), 1);
|
|
37
37
|
const notifyUpdates = async () => {
|
|
38
38
|
const pkgFile = await import_promises.default.readFile(import_node_path.default.join(process.cwd(), "./package.json"));
|
|
39
39
|
const pkg = JSON.parse(pkgFile);
|
package/dist/cjs/utils.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(utils_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(utils_exports);
|
|
36
36
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
37
37
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
38
|
-
const basePath = (process.env.BASE_PATH
|
|
38
|
+
const basePath = (process.env.BASE_PATH ?? "/").replace(/\/?$/, "/");
|
|
39
39
|
const isApp = () => import_node_fs.default.existsSync(import_node_path.default.join(process.cwd(), "app"));
|
|
40
40
|
const getAppConfig = () => {
|
|
41
41
|
const appConfigPath = import_node_path.default.join(
|
|
@@ -34,6 +34,7 @@ __export(helpers_exports, {
|
|
|
34
34
|
getAlias: () => getAlias,
|
|
35
35
|
getAppVersion: () => getAppVersion,
|
|
36
36
|
getCompressionPlugins: () => getCompressionPlugins,
|
|
37
|
+
getLibraryAlias: () => getLibraryAlias,
|
|
37
38
|
getLibraryName: () => getLibraryName,
|
|
38
39
|
getLibraryVariableName: () => getLibraryVariableName,
|
|
39
40
|
getMediaPath: () => getMediaPath,
|
|
@@ -48,9 +49,9 @@ __export(helpers_exports, {
|
|
|
48
49
|
module.exports = __toCommonJS(helpers_exports);
|
|
49
50
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
50
51
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
52
|
+
var import_zlib = __toESM(require("zlib"), 1);
|
|
51
53
|
var import_lodash = __toESM(require("lodash"), 1);
|
|
52
54
|
var import_compression_webpack_plugin = __toESM(require("compression-webpack-plugin"), 1);
|
|
53
|
-
var import_zlib = __toESM(require("zlib"), 1);
|
|
54
55
|
var import_utils = require("../monorepo/utils.js");
|
|
55
56
|
var import_utils2 = require("../utils.js");
|
|
56
57
|
let pathSep = import_node_path.default.sep;
|
|
@@ -64,8 +65,8 @@ const excludeNodeModulesExcept = (modules) => {
|
|
|
64
65
|
const moduleRegExps = getNodeModulesRegEx(modules);
|
|
65
66
|
return function(modulePath) {
|
|
66
67
|
if (/node_modules/.test(modulePath)) {
|
|
67
|
-
for (
|
|
68
|
-
if (
|
|
68
|
+
for (const moduleRegExp of moduleRegExps)
|
|
69
|
+
if (moduleRegExp.test(modulePath))
|
|
69
70
|
return false;
|
|
70
71
|
return true;
|
|
71
72
|
}
|
|
@@ -80,7 +81,7 @@ const getLibraryName = () => {
|
|
|
80
81
|
const modifiedLibName = `emui-${libraryName.replace("@elliemae/", "").replace("pui-", "")}`;
|
|
81
82
|
return import_lodash.default.camelCase(modifiedLibName);
|
|
82
83
|
};
|
|
83
|
-
const getLibraryVariableName = () => (process.env.LIBRARY_VARIABLE_NAME
|
|
84
|
+
const getLibraryVariableName = () => (process.env.LIBRARY_VARIABLE_NAME ?? getLibraryName()).split(".");
|
|
84
85
|
const mapToFolder = (dependencies, folder) => dependencies.reduce(
|
|
85
86
|
(acc, dependency) => ({
|
|
86
87
|
[dependency]: import_node_path.default.resolve(`${folder}/${dependency.replace("$", "")}`),
|
|
@@ -89,7 +90,7 @@ const mapToFolder = (dependencies, folder) => dependencies.reduce(
|
|
|
89
90
|
{}
|
|
90
91
|
);
|
|
91
92
|
const getAlias = () => {
|
|
92
|
-
const monorepoRoot = (0, import_utils.findMonoRepoRoot)(process.cwd())
|
|
93
|
+
const monorepoRoot = (0, import_utils.findMonoRepoRoot)(process.cwd()) ?? "";
|
|
93
94
|
return mapToFolder(
|
|
94
95
|
[
|
|
95
96
|
"@babel/runtime",
|
|
@@ -103,6 +104,8 @@ const getAlias = () => {
|
|
|
103
104
|
"styled-components",
|
|
104
105
|
"immer",
|
|
105
106
|
"react-dates",
|
|
107
|
+
"react-select",
|
|
108
|
+
"react-spring",
|
|
106
109
|
"react-transition-group",
|
|
107
110
|
"@elliemae/pui-cli",
|
|
108
111
|
"@elliemae/pui-app-sdk$",
|
|
@@ -111,6 +114,15 @@ const getAlias = () => {
|
|
|
111
114
|
import_node_path.default.join(monorepoRoot, "./node_modules")
|
|
112
115
|
);
|
|
113
116
|
};
|
|
117
|
+
const getLibraryAlias = (name, alias) => {
|
|
118
|
+
const monorepoRoot = (0, import_utils.findMonoRepoRoot)(process.cwd()) ?? "";
|
|
119
|
+
const aliasPath = import_node_path.default.resolve(
|
|
120
|
+
`${import_node_path.default.join(monorepoRoot, "./node_modules")}/${alias}`
|
|
121
|
+
);
|
|
122
|
+
return {
|
|
123
|
+
[name]: aliasPath
|
|
124
|
+
};
|
|
125
|
+
};
|
|
114
126
|
const modulesToTranspile = [
|
|
115
127
|
"@elliemae/pui-*",
|
|
116
128
|
"@elliemae/ds-*",
|
|
@@ -173,7 +185,7 @@ const getAppVersion = () => {
|
|
|
173
185
|
if (!process.env.APP_VERSION)
|
|
174
186
|
return LATEST_VERSION;
|
|
175
187
|
const match = process.env.APP_VERSION.match(/^v?(\d+\.\d+)\..*$/);
|
|
176
|
-
return match
|
|
188
|
+
return match?.[1] ?? LATEST_VERSION;
|
|
177
189
|
};
|
|
178
190
|
const getPaths = (latestVersion = true) => {
|
|
179
191
|
const version = latestVersion ? LATEST_VERSION : getAppVersion();
|
|
@@ -284,9 +284,12 @@ const baseConfig = (options) => ({
|
|
|
284
284
|
mainFields: ["browser", "module", "main"],
|
|
285
285
|
alias: {
|
|
286
286
|
...(0, import_helpers.getAlias)(),
|
|
287
|
-
...
|
|
287
|
+
...options.resolve?.alias ?? {}
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
|
+
externalsPresets: {
|
|
291
|
+
web: true
|
|
292
|
+
},
|
|
290
293
|
externals: {
|
|
291
294
|
"@elliemae/pui-user-monitoring": "emuiUserMonitoring",
|
|
292
295
|
"@elliemae/pui-app-loader": "emuiAppLoader",
|
|
@@ -311,7 +314,7 @@ const baseConfig = (options) => ({
|
|
|
311
314
|
"styled-system": "emuiAppReactDependencies.styledSystem"
|
|
312
315
|
// "@xstyled/styled-components": "emuiAppReactDependencies.xstyled",
|
|
313
316
|
},
|
|
314
|
-
devtool: options.devtool
|
|
315
|
-
performance: options.performance
|
|
316
|
-
devServer: options.devServer
|
|
317
|
+
devtool: options.devtool ?? "eval-source-map",
|
|
318
|
+
performance: options.performance ?? {},
|
|
319
|
+
devServer: options.devServer ?? {}
|
|
317
320
|
});
|
|
@@ -43,6 +43,8 @@ var import_middlewares = require("../server/middlewares.js");
|
|
|
43
43
|
var import_appRoutes = require("../server/appRoutes.js");
|
|
44
44
|
var import_helpers = require("./helpers.js");
|
|
45
45
|
var import_webpack_base_babel = require("./webpack.base.babel.js");
|
|
46
|
+
var import_utils = require("../server/utils.js");
|
|
47
|
+
var import_wsServer = require("../server/wsServer.js");
|
|
46
48
|
const import_meta = {};
|
|
47
49
|
const __filename = (0, import_node_url.fileURLToPath)(import_meta.url);
|
|
48
50
|
const {
|
|
@@ -98,7 +100,7 @@ const devConfig = {
|
|
|
98
100
|
// Add development plugins
|
|
99
101
|
plugins: [
|
|
100
102
|
new import_html_webpack_plugin.default({
|
|
101
|
-
inject: !(0, import_helpers.isAppLoaderEnabled)(),
|
|
103
|
+
inject: !(0, import_helpers.isAppLoaderEnabled)() ? "head" : false,
|
|
102
104
|
// Inject all files that are generated by webpack, e.g. bundle.js
|
|
103
105
|
template: !(0, import_helpers.isAppLoaderEnabled)() ? "app/index.html" : "app/index-app-loader.html",
|
|
104
106
|
emui: {
|
|
@@ -110,7 +112,8 @@ const devConfig = {
|
|
|
110
112
|
diagnosticsScriptPath,
|
|
111
113
|
encwLoaderScriptPath,
|
|
112
114
|
googleTagManager: (0, import_helpers.isGoogleTagManagerEnabled)()
|
|
113
|
-
}
|
|
115
|
+
},
|
|
116
|
+
scriptLoading: "defer"
|
|
114
117
|
}),
|
|
115
118
|
new import_circular_dependency_plugin.default({
|
|
116
119
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
@@ -143,7 +146,7 @@ const devConfig = {
|
|
|
143
146
|
},
|
|
144
147
|
hot: true,
|
|
145
148
|
open: [basePath],
|
|
146
|
-
port: process.env.PORT
|
|
149
|
+
port: process.env.PORT ?? "auto",
|
|
147
150
|
setupMiddlewares: (middlewares, devServer) => {
|
|
148
151
|
if (devServer.app) {
|
|
149
152
|
(0, import_middlewares.setupDefaultMiddlewares)(devServer.app);
|
|
@@ -160,6 +163,14 @@ const devConfig = {
|
|
|
160
163
|
}
|
|
161
164
|
next();
|
|
162
165
|
});
|
|
166
|
+
(0, import_wsServer.createWSServer)({
|
|
167
|
+
port: import_utils.wsPort
|
|
168
|
+
}).then(({ wsServer }) => {
|
|
169
|
+
if (devServer.app)
|
|
170
|
+
devServer.app.locals.wsServer = wsServer;
|
|
171
|
+
}).catch((err) => {
|
|
172
|
+
console.error(err);
|
|
173
|
+
});
|
|
163
174
|
}
|
|
164
175
|
return middlewares;
|
|
165
176
|
}
|
|
@@ -84,14 +84,22 @@ const baseConfig = (options) => ({
|
|
|
84
84
|
output: {
|
|
85
85
|
clean: true,
|
|
86
86
|
path: import_node_path.default.resolve(process.cwd(), "dist/umd"),
|
|
87
|
+
filename: "[name].js",
|
|
88
|
+
chunkFilename: "[name].[chunkhash].chunk.js",
|
|
89
|
+
assetModuleFilename: "assets/[name].[hash][ext][query]",
|
|
87
90
|
publicPath: "auto",
|
|
88
91
|
library: {
|
|
89
92
|
name: (0, import_helpers.getLibraryVariableName)(),
|
|
90
|
-
type: "
|
|
93
|
+
type: "var"
|
|
94
|
+
// type: 'module',
|
|
91
95
|
},
|
|
96
|
+
// module: true,
|
|
92
97
|
...options.output
|
|
93
98
|
},
|
|
94
99
|
// Merge with env dependent settings
|
|
100
|
+
// experiments: {
|
|
101
|
+
// outputModule: true,
|
|
102
|
+
// },
|
|
95
103
|
optimization: options.optimization,
|
|
96
104
|
module: {
|
|
97
105
|
rules: [
|
|
@@ -204,7 +212,7 @@ const baseConfig = (options) => ({
|
|
|
204
212
|
mainFields: ["browser", "module", "main"],
|
|
205
213
|
alias: {
|
|
206
214
|
...(0, import_helpers.getAlias)(),
|
|
207
|
-
...
|
|
215
|
+
...options.resolve?.alias ?? {}
|
|
208
216
|
},
|
|
209
217
|
plugins: [new import_resolve_typescript_plugin.default({})]
|
|
210
218
|
},
|
|
@@ -213,7 +221,7 @@ const baseConfig = (options) => ({
|
|
|
213
221
|
"@elliemae/pui-app-loader": "emuiAppLoader",
|
|
214
222
|
"@elliemae/pui-diagnostics": "emuiDiagnostics"
|
|
215
223
|
},
|
|
216
|
-
devtool: options.devtool
|
|
217
|
-
performance: options.performance
|
|
218
|
-
devServer: options.devServer
|
|
224
|
+
devtool: options.devtool ?? "eval-source-map",
|
|
225
|
+
performance: options.performance ?? {},
|
|
226
|
+
devServer: options.devServer ?? {}
|
|
219
227
|
});
|
|
@@ -47,17 +47,14 @@ const getHtmlWebpackPlugins = () => {
|
|
|
47
47
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
48
48
|
template: htmlTemplateFile,
|
|
49
49
|
filename: import_node_path.default.basename(htmlTemplateFile),
|
|
50
|
-
inject:
|
|
50
|
+
inject: "head",
|
|
51
|
+
scriptLoading: "defer",
|
|
52
|
+
library: (0, import_helpers.getLibraryVariableName)()
|
|
51
53
|
})
|
|
52
54
|
);
|
|
53
55
|
};
|
|
54
56
|
var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig)({
|
|
55
57
|
mode: "development",
|
|
56
|
-
// output: {
|
|
57
|
-
// filename: `js/${libraryName}.js`,
|
|
58
|
-
// chunkFilename: `js/${libraryName}.chunk.js`,
|
|
59
|
-
// assetModuleFilename: '[name][ext][query]',
|
|
60
|
-
// },
|
|
61
58
|
optimization: {
|
|
62
59
|
splitChunks: {
|
|
63
60
|
chunks: "all"
|
|
@@ -74,10 +71,7 @@ var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig
|
|
|
74
71
|
failOnError: false
|
|
75
72
|
// show a warning when there is a circular dependency
|
|
76
73
|
}),
|
|
77
|
-
new import_mini_css_extract_plugin.default({
|
|
78
|
-
// filename: `css/${libraryName}.css`,
|
|
79
|
-
// chunkFilename: `css/${libraryName}.chunk.css`,
|
|
80
|
-
}),
|
|
74
|
+
new import_mini_css_extract_plugin.default({}),
|
|
81
75
|
new import_webpack.default.ProgressPlugin()
|
|
82
76
|
],
|
|
83
77
|
devtool: "eval-source-map",
|
|
@@ -95,7 +89,7 @@ var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig
|
|
|
95
89
|
historyApiFallback: true,
|
|
96
90
|
hot: true,
|
|
97
91
|
open: [basePath],
|
|
98
|
-
port: process.env.PORT
|
|
92
|
+
port: process.env.PORT ?? "auto",
|
|
99
93
|
headers: {
|
|
100
94
|
"Access-Control-Allow-Origin": "*",
|
|
101
95
|
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS"
|
|
@@ -46,7 +46,9 @@ const getHtmlWebpackPlugins = () => {
|
|
|
46
46
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
47
47
|
template: htmlTemplateFile,
|
|
48
48
|
filename: import_node_path.default.basename(htmlTemplateFile),
|
|
49
|
-
inject:
|
|
49
|
+
inject: "head",
|
|
50
|
+
scriptLoading: "defer",
|
|
51
|
+
library: (0, import_helpers.getLibraryVariableName)(),
|
|
50
52
|
minify: {
|
|
51
53
|
removeComments: true,
|
|
52
54
|
collapseWhitespace: true,
|
|
@@ -82,10 +84,7 @@ const prodConfig = {
|
|
|
82
84
|
},
|
|
83
85
|
plugins: [
|
|
84
86
|
...getHtmlWebpackPlugins(),
|
|
85
|
-
new import_mini_css_extract_plugin.default({
|
|
86
|
-
// filename: `css/${libraryName}.[contenthash].css`,
|
|
87
|
-
// chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
|
|
88
|
-
}),
|
|
87
|
+
new import_mini_css_extract_plugin.default({}),
|
|
89
88
|
...(0, import_helpers.getCompressionPlugins)(true),
|
|
90
89
|
new import_webpack_bundle_analyzer.BundleAnalyzerPlugin({
|
|
91
90
|
analyzerMode: "static",
|
|
@@ -111,7 +111,7 @@ const {
|
|
|
111
111
|
basePath
|
|
112
112
|
} = (0, import_helpers.getPaths)();
|
|
113
113
|
const htmlWebpackPlugin = new import_html_webpack_plugin.default({
|
|
114
|
-
inject: !(0, import_helpers.isAppLoaderEnabled)(),
|
|
114
|
+
inject: !(0, import_helpers.isAppLoaderEnabled)() ? "head" : false,
|
|
115
115
|
template: !(0, import_helpers.isAppLoaderEnabled)() ? "app/index.html" : "app/index-app-loader.html",
|
|
116
116
|
minify: {
|
|
117
117
|
removeComments: true,
|
|
@@ -134,7 +134,8 @@ const htmlWebpackPlugin = new import_html_webpack_plugin.default({
|
|
|
134
134
|
diagnosticsScriptPath,
|
|
135
135
|
encwLoaderScriptPath,
|
|
136
136
|
googleTagManager: (0, import_helpers.isGoogleTagManagerEnabled)()
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
|
+
scriptLoading: "defer"
|
|
138
139
|
});
|
|
139
140
|
const config = (0, import_webpack_base_babel.baseConfig)(getProdConfig());
|
|
140
141
|
if (config.plugins)
|
|
@@ -28,7 +28,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var webpack_storybook_exports = {};
|
|
30
30
|
__export(webpack_storybook_exports, {
|
|
31
|
-
managerWebpack: () => managerWebpack,
|
|
32
31
|
webpackFinal: () => webpackFinal
|
|
33
32
|
});
|
|
34
33
|
module.exports = __toCommonJS(webpack_storybook_exports);
|
|
@@ -97,15 +96,22 @@ const webpackFinal = (config, { configType }) => {
|
|
|
97
96
|
config.plugins = config?.plugins?.concat((0, import_helpers.getCompressionPlugins)());
|
|
98
97
|
}
|
|
99
98
|
if (config.resolve) {
|
|
100
|
-
config.resolve.alias = {
|
|
99
|
+
config.resolve.alias = {
|
|
100
|
+
...config?.resolve?.alias,
|
|
101
|
+
...(0, import_helpers.getAlias)(),
|
|
102
|
+
...(0, import_helpers.getLibraryAlias)(
|
|
103
|
+
"@reduxjs/toolkit/query/react",
|
|
104
|
+
"@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"
|
|
105
|
+
)
|
|
106
|
+
};
|
|
101
107
|
config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
|
|
102
108
|
config.resolve.extensions?.push(".svg");
|
|
103
109
|
config.resolve.plugins = [
|
|
104
|
-
...config.resolve.plugins
|
|
110
|
+
...config.resolve.plugins ?? [],
|
|
105
111
|
new import_resolve_typescript_plugin.default({})
|
|
106
112
|
];
|
|
107
113
|
}
|
|
108
|
-
config.externals = config.externals
|
|
114
|
+
config.externals = config.externals ?? {};
|
|
109
115
|
if (config.externals) {
|
|
110
116
|
config.externals["@elliemae/pui-user-monitoring"] = "emuiUserMonitoring";
|
|
111
117
|
config.externals["@elliemae/pui-app-loader"] = "emuiAppLoader";
|
|
@@ -113,10 +119,3 @@ const webpackFinal = (config, { configType }) => {
|
|
|
113
119
|
}
|
|
114
120
|
return config;
|
|
115
121
|
};
|
|
116
|
-
const managerWebpack = (config) => {
|
|
117
|
-
if (config.plugins)
|
|
118
|
-
config.plugins = config.plugins.concat((0, import_helpers.getCompressionPlugins)());
|
|
119
|
-
if (config.resolve)
|
|
120
|
-
config.resolve.alias = { ...config.resolve.alias, ...(0, import_helpers.getAlias)() };
|
|
121
|
-
return config;
|
|
122
|
-
};
|