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/test/sourcemaps/samples/sourcemap-concat/_config.js

16 lines
389 B

import MagicString from 'magic-string';
import { magic_string_preprocessor_result } from '../../helpers';
export default {
js_map_sources: ['input.svelte'],
preprocess: [
{
script: ({ content }) => {
const src = new MagicString(content);
src.prepend('console.log("Injected first line");\n');
return magic_string_preprocessor_result('input.svelte', src);
}
}
]
};