MCPcopy
hub / github.com/sveltejs/svelte / compileModule

Function compileModule

packages/svelte/src/compiler/index.js:69–76  ·  view source on GitHub ↗
(source, options)

Source from the content-addressed store, hash-verified

67 * @returns {CompileResult}
68 */
69export function compileModule(source, options) {
70 source = remove_bom(source);
71 state.reset({ warning: options.warningFilter, filename: options.filename });
72 const validated = validate_module_options(options, '');
73
74 const analysis = analyze_module(source, validated);
75 return transform_module(analysis, source, validated);
76}
77
78/**
79 * The parse function parses a component, returning only its abstract syntax tree.

Callers 3

compile_directoryFunction · 0.90
test.tsFile · 0.90
run.jsFile · 0.90

Calls 4

analyze_moduleFunction · 0.90
transform_moduleFunction · 0.90
remove_bomFunction · 0.85
resetMethod · 0.80

Tested by

no test coverage detected