_config.js — svelte Source File
Architecture documentation for _config.js, a javascript file in the svelte codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 885434c3_353d_92a4_c2a0_7d7c3e07ee43["_config.js"] 032186a9_8a8b_b603_4335_6ade22d767cb["test.ts"] 885434c3_353d_92a4_c2a0_7d7c3e07ee43 --> 032186a9_8a8b_b603_4335_6ade22d767cb 6bc9684c_1a71_1bdf_8ee4_8d5d204604b3["magic-string"] 885434c3_353d_92a4_c2a0_7d7c3e07ee43 --> 6bc9684c_1a71_1bdf_8ee4_8d5d204604b3 f595e976_3179_7b6b_600e_75712e31637c["source-map"] 885434c3_353d_92a4_c2a0_7d7c3e07ee43 --> f595e976_3179_7b6b_600e_75712e31637c f8929fbd_6327_2bb8_f43b_31a3db2e4d74["node:path"] 885434c3_353d_92a4_c2a0_7d7c3e07ee43 --> f8929fbd_6327_2bb8_f43b_31a3db2e4d74 style 885434c3_353d_92a4_c2a0_7d7c3e07ee43 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import MagicString from 'magic-string';
import { test } from '../../test';
import { SourceMapConsumer, SourceMapGenerator } from 'source-map';
import * as path from 'node:path';
export default test({
preprocess: {
style: async ({ content, filename = '' }) => {
const src = new MagicString(content);
const idx = content.indexOf('baritone');
src.overwrite(idx, idx + 'baritone'.length, 'bar');
// This test checks that the sourcemap format from source-map
// also works with our preprocessor merging.
const map = SourceMapGenerator.fromSourceMap(
await new SourceMapConsumer(
// sourcemap must be encoded for SourceMapConsumer
src.generateMap({
source: path.basename(filename),
hires: true,
includeContent: false
})
)
);
return { code: src.toString(), map };
}
},
css: [{ str: '--baritone: red', strGenerated: '--bar: red' }, '--baz: blue']
});
Domain
Dependencies
- magic-string
- node:path
- source-map
- test.ts
Source
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 4 module(s): magic-string, node:path, source-map, test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/sourcemaps/samples/source-map-generator/_config.js (domain: BuildSystem, directory: packages/svelte/tests/sourcemaps/samples/source-map-generator).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free