core: fix things with stupid esbuild

This commit is contained in:
undefined committed 2024-01-05 20:00:18 +08:00
1 parent 1f2f456a24
commit b07734ad77
3 files changed
+28 -20

No files matched your search

+4
View File
@@ -36,6 +36,10 @@ function transform(filename) {
});
if (result.warnings.length) console.warn(result.warnings);
map[filename] = result.map;
if (process.env.LOADER_DUMP_CODE && filename.endsWith(`/${process.env.LOADER_DUMP_CODE}`)) {
console.log(`-----${filename}-----`);
console.log(result.code.split('/# sourceMappingURL=')[0]);
}
return result.code;
}
const _script = new vm.Script('"Hydro"', { produceCachedData: true });