mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Add a couple feature flags
This commit is contained in:
@@ -3152,6 +3152,7 @@ pub const VirtualMachine = struct {
|
||||
}
|
||||
|
||||
const code = code: {
|
||||
if (bun.getRuntimeFeatureFlag("BUN_DISABLE_SOURCE_CODE_PREVIEW") or bun.getRuntimeFeatureFlag("BUN_DISABLE_TRANSPILED_SOURCE_CODE_PREVIEW")) break :code ZigString.Slice.empty;
|
||||
if (!top.remapped and lookup.source_map != null and lookup.source_map.?.isExternal()) {
|
||||
if (lookup.getSourceCode(top_source_url.slice())) |src| {
|
||||
break :code src;
|
||||
|
||||
@@ -166,6 +166,7 @@ fn dumpSourceString(vm: *VirtualMachine, specifier: string, written: []const u8)
|
||||
|
||||
fn dumpSourceStringFailiable(vm: *VirtualMachine, specifier: string, written: []const u8) !void {
|
||||
if (!Environment.isDebug) return;
|
||||
if (bun.getRuntimeFeatureFlag("BUN_DEBUG_NO_DUMP")) return;
|
||||
|
||||
const BunDebugHolder = struct {
|
||||
pub var dir: ?std.fs.Dir = null;
|
||||
|
||||
Reference in New Issue
Block a user