diff options
author | 2021-09-02 15:54:07 -0700 | |
---|---|---|
committer | 2021-09-02 15:54:07 -0700 | |
commit | d009e02c1db0f93b24a9c1b539135a25347f1027 (patch) | |
tree | 76e2adba7bc62f3ff17b14953869b7963989990e /src/options.zig | |
parent | 1b894ad9f61d4d39486f3a03aab42de4f750294e (diff) | |
download | bun-d009e02c1db0f93b24a9c1b539135a25347f1027.tar.gz bun-d009e02c1db0f93b24a9c1b539135a25347f1027.tar.zst bun-d009e02c1db0f93b24a9c1b539135a25347f1027.zip |
latest
Former-commit-id: 1086d4f894611c1171f57d9eaf82f9170e9de2d1
Diffstat (limited to 'src/options.zig')
-rw-r--r-- | src/options.zig | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/options.zig b/src/options.zig index 6d73afe6d..0251c8416 100644 --- a/src/options.zig +++ b/src/options.zig @@ -85,11 +85,11 @@ pub const ExternalModules = struct { }, .bun => { - // TODO: fix this stupid copy - result.node_modules.hash_map.ensureCapacity(BunNodeBuiltinPatternsCompat.len) catch unreachable; - for (BunNodeBuiltinPatternsCompat) |pattern| { - result.node_modules.insert(pattern) catch unreachable; - } + // // TODO: fix this stupid copy + // result.node_modules.hash_map.ensureCapacity(BunNodeBuiltinPatternsCompat.len) catch unreachable; + // for (BunNodeBuiltinPatternsCompat) |pattern| { + // result.node_modules.insert(pattern) catch unreachable; + // } }, else => {}, } @@ -809,6 +809,7 @@ pub const BundleOptions = struct { defines_loaded: bool = false, env: Env = Env{}, transform_options: Api.TransformOptions, + polyfill_node_globals: bool = true, pub inline fn cssImportBehavior(this: *const BundleOptions) Api.CssInJsBehavior { switch (this.platform) { @@ -1143,6 +1144,8 @@ pub const BundleOptions = struct { opts.output_dir_handle = try openOutputDir(opts.output_dir); } + opts.polyfill_node_globals = opts.platform != .node; + return opts; } }; |