You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/packages/svelte/tests/sourcemaps/samples/sourcemap-offsets/_config.js

20 lines
520 B

import { test } from '../../test';
import { magic_string_bundle } from '../../helpers.js';
const EXTERNAL = 'span { --external-var: 1px; }';
export default test({
css_map_sources: ['input.svelte', 'external.css'],
preprocess: [
{
style: ({ content }) => {
return magic_string_bundle([
{ code: EXTERNAL, filename: 'external.css' },
{ code: content, filename: 'input.svelte' }
]);
}
}
],
preprocessed: [{ str: '--component-var: 2px' }, { code: EXTERNAL, str: '--external-var: 1px' }]
});