MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getHMRPlugins

Function getHMRPlugins

packages/vite/hmr/server/index.ts:4–23  ·  view source on GitHub ↗
(opts: { platform: string; flavor: string; verbose: boolean })

Source from the content-addressed store, hash-verified

2import { hmrWebSocketVue, hmrWebSocketAngular, hmrWebSocketSolid, hmrWebSocketTypescript } from './websocket.js';
3
4export function getHMRPlugins(opts: { platform: string; flavor: string; verbose: boolean }) {
5 const plugins = [nsHmrClientVitePlugin(opts)];
6 switch (opts.flavor) {
7 case 'vue':
8 plugins.push(hmrWebSocketVue(opts));
9 break;
10 case 'react':
11 break;
12 case 'angular':
13 plugins.push(hmrWebSocketAngular(opts));
14 break;
15 case 'typescript':
16 plugins.push(hmrWebSocketTypescript(opts));
17 break;
18 case 'solid':
19 plugins.push(hmrWebSocketSolid(opts));
20 break;
21 }
22 return plugins;
23}

Callers 1

baseConfigFunction · 0.85

Calls 6

nsHmrClientVitePluginFunction · 0.85
hmrWebSocketVueFunction · 0.85
hmrWebSocketAngularFunction · 0.85
hmrWebSocketTypescriptFunction · 0.85
hmrWebSocketSolidFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected