diff options
author | 2022-03-01 22:16:09 -0800 | |
---|---|---|
committer | 2022-03-01 22:16:09 -0800 | |
commit | 2ccb063d206cf26037db4df42f813e207fe9ca13 (patch) | |
tree | 576a6903bfe3c0eb962836cd19fba6f3d48e1b88 /src/options.zig | |
parent | 710303be7ae12302193be3ce90da2eec61f4203e (diff) | |
download | bun-2ccb063d206cf26037db4df42f813e207fe9ca13.tar.gz bun-2ccb063d206cf26037db4df42f813e207fe9ca13.tar.zst bun-2ccb063d206cf26037db4df42f813e207fe9ca13.zip |
[bun.js] Allow disabling runtime imports so bun can build for node
Diffstat (limited to 'src/options.zig')
-rw-r--r-- | src/options.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/options.zig b/src/options.zig index aea7d13d1..c0808d96e 100644 --- a/src/options.zig +++ b/src/options.zig @@ -25,7 +25,7 @@ const default_allocator = _global.default_allocator; const C = _global.C; const StoredFileDescriptorType = _global.StoredFileDescriptorType; const JSC = @import("javascript_core"); - +const Runtime = @import("./runtime.zig").Runtime; const Analytics = @import("./analytics/analytics_thread.zig"); const MacroRemap = @import("./resolver/package_json.zig").MacroMap; const DotEnv = @import("./env_loader.zig"); @@ -1087,6 +1087,8 @@ pub const BundleOptions = struct { loaders: std.StringHashMap(Loader), resolve_dir: string = "/", jsx: JSX.Pragma = JSX.Pragma{}, + auto_import_jsx: bool = true, + allow_runtime: bool = true, hot_module_reloading: bool = false, inject: ?[]string = null, @@ -1285,6 +1287,7 @@ pub const BundleOptions = struct { switch (opts.platform) { .node => { opts.import_path_format = .relative_nodejs; + opts.allow_runtime = false; }, .bun => { // If we're doing SSR, we want all the URLs to be the same as what it would be in the browser |