MCPcopy
hub / github.com/vitest-dev/vitest / transform

Function transform

packages/browser/src/node/plugin.ts:335–341  ·  view source on GitHub ↗
(code, id)

Source from the content-addressed store, hash-verified

333 }
334 },
335 transform(code, id) {
336 if (id.includes(parentServer.vite.config.cacheDir) && id.includes('loupe.js')) {
337 // loupe bundle has a nasty require('util') call that leaves a warning in the console
338 const utilRequire = 'nodeUtil = require_util();'
339 return code.replace(utilRequire, ' '.repeat(utilRequire.length))
340 }
341 },
342 },
343 BrowserContext(parentServer),
344 dynamicImportPlugin({

Callers 1

Calls 2

testMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected