MCPcopy
hub / github.com/pmmmwh/react-refresh-webpack-plugin / getIntegrationEntry

Function getIntegrationEntry

lib/utils/getIntegrationEntry.js:6–20  ·  view source on GitHub ↗

* Gets entry point of a supported socket integration. * @param {'wds' | 'whm' | 'wps' | string} integrationType A valid socket integration type or a path to a module. * @returns {string | undefined} Path to the resolved integration entry point.

(integrationType)

Source from the content-addressed store, hash-verified

4 * @returns {string | undefined} Path to the resolved integration entry point.
5 */
6function getIntegrationEntry(integrationType) {
7 let resolvedEntry;
8 switch (integrationType) {
9 case 'whm': {
10 resolvedEntry = 'webpack-hot-middleware/client';
11 break;
12 }
13 case 'wps': {
14 resolvedEntry = 'webpack-plugin-serve/client';
15 break;
16 }
17 }
18
19 return resolvedEntry;
20}
21
22module.exports = getIntegrationEntry;

Callers 2

applyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…