File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ // @ts -ignore
2+ process . turbopack = { } ;
Original file line number Diff line number Diff line change @@ -92,6 +92,27 @@ pub async fn get_evaluate_pool(
9292 let ( Some ( cwd) , Some ( entrypoint) ) = ( to_sys_path ( cwd) . await ?, to_sys_path ( path) . await ?) else {
9393 panic ! ( "can only evaluate from a disk filesystem" ) ;
9494 } ;
95+
96+ let runtime_entries = {
97+ let globals_module = EcmascriptModuleAssetVc :: new (
98+ SourceAssetVc :: new ( embed_file_path ( "globals.ts" ) ) . into ( ) ,
99+ context,
100+ Value :: new ( EcmascriptModuleAssetType :: Typescript ) ,
101+ EcmascriptInputTransformsVc :: cell ( vec ! [ EcmascriptInputTransform :: TypeScript ] ) ,
102+ context. environment ( ) ,
103+ )
104+ . as_ecmascript_chunk_placeable ( ) ;
105+
106+ let mut entries = vec ! [ globals_module] ;
107+ if let Some ( other_entries) = runtime_entries {
108+ for entry in & * other_entries. await ? {
109+ entries. push ( entry. clone ( ) )
110+ }
111+ } ;
112+
113+ Some ( EcmascriptChunkPlaceablesVc :: cell ( entries) )
114+ } ;
115+
95116 let bootstrap = NodeJsBootstrapAsset {
96117 path,
97118 chunk_group : ChunkGroupVc :: from_chunk (
You can’t perform that action at this time.
0 commit comments