MCPcopy
hub / github.com/nuxt/nuxt / parseModuleId

Function parseModuleId

packages/nuxt/src/core/utils/plugins.ts:9–15  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

7 * that may carry query strings (e.g. `?vue&type=style&lang=css`).
8 */
9export function parseModuleId (id: string): { pathname: string, search: string } {
10 const qIndex = id.indexOf('?')
11 if (qIndex === -1) {
12 return { pathname: id, search: '' }
13 }
14 return { pathname: id.slice(0, qIndex), search: id.slice(qIndex) }
15}
16
17const NUXT_COMPONENT_RE = /[?&]nuxt_component=/
18const MACRO_RE = /[?&]macro=/

Callers 12

transformIncludeFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90
parseMacroQueryFunction · 0.90
handlerFunction · 0.90
transformFunction · 0.90
normalizePathFunction · 0.90
resolveFilePathFunction · 0.90
isVueFunction · 0.85
isJSFunction · 0.85
getLoaderFunction · 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…