Skip to content

Commit bfbc0b2

Browse files
authored
fix(react-email): Missing preloaded node modules causing issues (#1220)
1 parent eaf6ada commit bfbc0b2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/react-email/src/utils/static-node-modules-for-vm.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
import zlib from 'node:zlib';
22
import vm from 'node:vm';
3+
import v8 from 'node:v8';
34
import util from 'node:util';
45
import url from 'node:url';
6+
import tty from 'node:tty';
57
import tls from 'node:tls';
68
import timers from 'node:timers';
79
import stringDecoder from 'node:string_decoder';
810
import stream from 'node:stream';
911
import readline from 'node:readline';
1012
import querystring from 'node:querystring';
13+
import punycode from 'node:punycode';
1114
import path from 'node:path';
1215
import os from 'node:os';
1316
import net from 'node:net';
1417
import https from 'node:https';
1518
import http from 'node:http';
1619
import fs from 'node:fs';
1720
import events from 'node:events';
21+
import domain from 'node:domain';
1822
import dns from 'node:dns';
1923
import dgram from 'node:dgram';
2024
import crypto from 'node:crypto';
2125
import cluster from 'node:cluster';
26+
import childProcess from 'node:child_process';
2227
import buffer from 'node:buffer';
2328
import assert from 'node:assert';
2429

@@ -32,10 +37,14 @@ export const staticNodeModulesForVM = {
3237
'node:zlib': zlib,
3338
vm,
3439
'node:vm': vm,
40+
v8,
41+
'node:v8': v8,
3542
util,
3643
'node:util': util,
3744
url,
3845
'node:url': url,
46+
tty,
47+
'node:tty': tty,
3948
tls,
4049
'node:tls': tls,
4150
timers,
@@ -48,6 +57,8 @@ export const staticNodeModulesForVM = {
4857
'node:readline': readline,
4958
querystring,
5059
'node:querystring': querystring,
60+
punycode,
61+
'node:punycode': punycode,
5162
path,
5263
'node:path': path,
5364
os,
@@ -62,6 +73,8 @@ export const staticNodeModulesForVM = {
6273
'node:fs': fs,
6374
events,
6475
'node:events': events,
76+
domain,
77+
'node:domain': domain,
6578
dns,
6679
'node:dns': dns,
6780
dgram,
@@ -70,6 +83,8 @@ export const staticNodeModulesForVM = {
7083
'node:crypto': crypto,
7184
cluster,
7285
'node:cluster': cluster,
86+
'child_process': childProcess,
87+
'node:child_process': childProcess,
7388
buffer,
7489
'node:buffer': buffer,
7590
assert,

0 commit comments

Comments
 (0)