MCPcopy Index your code
hub / github.com/QwikDev/qwik / fixDtsContent

Function fixDtsContent

scripts/api.ts:333–343  ·  view source on GitHub ↗

* Fix up the generated dts content, and ensure it's using a relative path to find the core.d.ts * file, rather than node resolving it.

(config: BuildConfig, srcPath: string, relativePath?: string)

Source from the content-addressed store, hash-verified

331 * file, rather than node resolving it.
332 */
333function fixDtsContent(config: BuildConfig, srcPath: string, relativePath?: string) {
334 let dts = readFileSync(srcPath, 'utf-8');
335
336 // ensure we're just using a relative path
337 if (relativePath) {
338 dts = dts.replace(/'@builder\.io\/qwik(.*)'/g, `'${relativePath}$1'`);
339 }
340
341 // replace QWIK_VERSION with the actual version number, useful for debugging
342 return dts.replace(/QWIK_VERSION/g, config.distVersion);
343}

Callers 1

createTypesApiFunction · 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…