remove hack

pull/5428/head
Milan Hauth 5 years ago
parent b7d5974a51
commit 7cccff1305

@ -214,17 +214,6 @@ export default async function preprocess(
sourcemap_list.unshift(res.get_sourcemap()); sourcemap_list.unshift(res.get_sourcemap());
} }
// HACK
// remove `undefined` sources in first sourcemap
// otherwise remapper throws error:
// Error: Transformation map 0 must have exactly one source file.
// Did you specify these with the most recent transformation maps first?
// test: preprocess comments
(firstMap => {
if (firstMap && firstMap.sources)
firstMap.sources = firstMap.sources.filter(Boolean);
})(sourcemap_list[0] as any);
// https://github.com/ampproject/remapping#usage // https://github.com/ampproject/remapping#usage
// https://github.com/mozilla/source-map#new-sourcemapconsumerrawsourcemap // https://github.com/mozilla/source-map#new-sourcemapconsumerrawsourcemap
const map: ReturnType<typeof remapper> = const map: ReturnType<typeof remapper> =

Loading…
Cancel
Save