aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-16 01:56:14 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-16 01:56:14 -0700
commite05cc8db90b4d1d093777b580b82c17550740a6b (patch)
tree6c762be47d5cd172d7907780e9b01f7f9746d8b7 /src/runtime.zig
parent09357f55f9115bb05c57d07ee489a11e79b1a42b (diff)
downloadbun-e05cc8db90b4d1d093777b580b82c17550740a6b.tar.gz
bun-e05cc8db90b4d1d093777b580b82c17550740a6b.tar.zst
bun-e05cc8db90b4d1d093777b580b82c17550740a6b.zip
prepare for unwrapping
Diffstat (limited to 'src/runtime.zig')
-rw-r--r--src/runtime.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime.zig b/src/runtime.zig
index 8a0c4611b..7af9015ed 100644
--- a/src/runtime.zig
+++ b/src/runtime.zig
@@ -326,6 +326,14 @@ pub const Runtime = struct {
dont_bundle_twice: bool = false,
+ /// This is a list of packages which even when require() is used, we will
+ /// instead convert to ESM import statements.
+ ///
+ /// This is not normally a safe transformation.
+ ///
+ /// So we have a list of packages which we know are safe to do this with.
+ unwrap_commonjs_packages: []const string = .{},
+
pub const ReplaceableExport = union(enum) {
delete: void,
replace: JSAst.Expr,