File tree Expand file tree Collapse file tree 3 files changed +6
-105
lines changed
packages/unenv-preset/src Expand file tree Collapse file tree 3 files changed +6
-105
lines changed Original file line number Diff line number Diff line change @@ -180,18 +180,20 @@ function getHttpOverrides({
180180 ( httpServerEnabledByFlag || httpServerEnabledByDate ) &&
181181 ! httpServerDisabledByFlag ;
182182
183- // Override unenv base aliases with native and hybrid modules
184- // `node:https` is fully implemented by workerd if both flags are enabled
185183 return {
186184 nativeModules : [
187185 "_http_agent" ,
188186 "_http_client" ,
189187 "_http_common" ,
190188 "_http_incoming" ,
191189 "_http_outgoing" ,
192- ...( httpServerEnabled ? [ "_http_server" , "https" ] : [ ] ) ,
190+ // `_http_server` can only be imported when the server flag is set
191+ // See https://github.com/cloudflare/workerd/blob/56efc04/src/workerd/api/node/node.h#L102-L106
192+ ...( httpServerEnabled ? [ "_http_server" ] : [ ] ) ,
193+ "http" ,
194+ "https" ,
193195 ] ,
194- hybridModules : httpServerEnabled ? [ "http" ] : [ "http" , "https" ] ,
196+ hybridModules : [ ] ,
195197 } ;
196198}
197199
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments