Home / File/ _config.js — svelte Source File

_config.js — svelte Source File

Architecture documentation for _config.js, a javascript file in the svelte codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  00e494b0_1845_22c5_8b3f_7c04ee9c4d54["_config.js"]
  fc06c886_51db_d0d2_6501_4080bb86736e["test.ts"]
  00e494b0_1845_22c5_8b3f_7c04ee9c4d54 --> fc06c886_51db_d0d2_6501_4080bb86736e
  6bc9684c_1a71_1bdf_8ee4_8d5d204604b3["magic-string"]
  00e494b0_1845_22c5_8b3f_7c04ee9c4d54 --> 6bc9684c_1a71_1bdf_8ee4_8d5d204604b3
  style 00e494b0_1845_22c5_8b3f_7c04ee9c4d54 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import MagicString from 'magic-string';
import { test } from '../../test';

export default test({
	preprocess: {
		script: ({ content, filename }) => {
			const s = new MagicString(content);
			s.overwrite(
				content.indexOf('__THE_ANSWER__'),
				content.indexOf('__THE_ANSWER__') + '__THE_ANSWER__'.length,
				'42'
			);
			return {
				code: s.toString(),
				map: s.generateMap({ hires: true, file: filename })
			};
		}
	}
});

Domain

Dependencies

Frequently Asked Questions

What does _config.js do?
_config.js is a source file in the svelte codebase, written in javascript. It belongs to the BuildSystem domain.
What does _config.js depend on?
_config.js imports 2 module(s): magic-string, test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/preprocess/samples/script/_config.js (domain: BuildSystem, directory: packages/svelte/tests/preprocess/samples/script).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free