MCPcopy Index your code
hub / github.com/tinyplex/tinybase / compileSvelteModule

Function compileSvelteModule

test/unit/documentation.test.ts:446–457  ·  view source on GitHub ↗
(source: string, path: string)

Source from the content-addressed store, hash-verified

444const isSvelteModule = (path: string): boolean => /\.svelte\.[jt]s$/.test(path);
445
446const compileSvelteModule = (source: string, path: string): string =>
447 compileModule(
448 transformSync(source, {
449 format: 'esm',
450 loader: extname(path).slice(1) as 'js' | 'ts',
451 target: 'esnext',
452 }).code,
453 {
454 filename: path,
455 generate: 'client',
456 },
457 ).js.code;
458
459const prepareBundledResults = async (
460 files: {[path: string]: string},

Callers 1

setupFunction · 0.85

Calls 1

compileModuleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…