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/decoded-sourcemap/_config.js

16 lines
410 B

import MagicString from 'magic-string';
import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers';
export default {
js_map_sources: ['input.svelte'],
preprocess: {
markup: ({ content, filename }) => {
const src = new MagicString(content);
magic_string_replace_all(src, 'replace me', 'success');
return magic_string_preprocessor_result(filename, src);
}
}
};