mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
29 lines
762 B
Zig
29 lines
762 B
Zig
const bun = @import("bun");
|
|
|
|
const std = @import("std");
|
|
|
|
const Api = @import("../api/schema.zig").Api;
|
|
|
|
pub const DefaultBunDefines = struct {
|
|
pub const Keys = struct {
|
|
const window = "window";
|
|
};
|
|
pub const Values = struct {
|
|
const window = "undefined";
|
|
};
|
|
};
|
|
|
|
pub fn configureTransformOptionsForBunVM(allocator: std.mem.Allocator, _args: Api.TransformOptions) !Api.TransformOptions {
|
|
var args = _args;
|
|
|
|
args.write = false;
|
|
args.resolve = Api.ResolveMode.lazy;
|
|
return try configureTransformOptionsForBun(allocator, args);
|
|
}
|
|
|
|
pub fn configureTransformOptionsForBun(_: std.mem.Allocator, _args: Api.TransformOptions) !Api.TransformOptions {
|
|
var args = _args;
|
|
args.target = Api.Target.bun;
|
|
return args;
|
|
}
|