MCPcopy
hub / github.com/vitejs/vite / addNodePrefix

Function addNodePrefix

packages/vite/rolldown.dts.config.ts:423–436  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421}
422
423function addNodePrefix(): Plugin {
424 return {
425 name: 'add-node-prefix',
426 resolveId: {
427 order: 'pre',
428 filter: {
429 id: new RegExp(`^(?:${builtinModules.join('|')})$`),
430 },
431 handler(id) {
432 return { id: `node:${id}`, external: true }
433 },
434 },
435 }
436}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected