diff --git a/crates/pack-tests/tests/snapshot/async_chunk/output/input_86dfc83f.js b/crates/pack-tests/tests/snapshot/async_chunk/output/input_86dfc83f.js index 1dbca11c5..678bca51d 100644 --- a/crates/pack-tests/tests/snapshot/async_chunk/output/input_86dfc83f.js +++ b/crates/pack-tests/tests/snapshot/async_chunk/output/input_86dfc83f.js @@ -1,15 +1,15 @@ -(globalThis["utooChunk_async_chunk_test"] || (globalThis["utooChunk_async_chunk_test"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -192, ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +192, (function(__turbopack_context__) { -__turbopack_context__.v((parentImport) => { +__turbopack_context__.v(function(parentImport) { return Promise.all([ "input_97190704.js" -].map((chunk) => __turbopack_context__.l(chunk))).then(() => { +].map(function(chunk) { return __turbopack_context__.l(chunk); })).then(function() { return parentImport(476); }); }); }), -402, ((__turbopack_context__) => { +402, (function(__turbopack_context__) { "use strict"; function bar(value) { @@ -21,7 +21,7 @@ __turbopack_context__.s([ bar ]); }), -545, ((__turbopack_context__) => { +545, (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__402__ = __turbopack_context__.i(402); @@ -34,7 +34,7 @@ __turbopack_context__.A(192).then(({ foo })=>{ }); __turbopack_context__.s([]); }), -743, ((__turbopack_context__, module, exports) => { +743, (function(__turbopack_context__, module, exports) { // shared package }), diff --git a/crates/pack-tests/tests/snapshot/async_chunk/output/input_97190704.js b/crates/pack-tests/tests/snapshot/async_chunk/output/input_97190704.js index bd7aaf0af..3fabc3cf1 100644 --- a/crates/pack-tests/tests/snapshot/async_chunk/output/input_97190704.js +++ b/crates/pack-tests/tests/snapshot/async_chunk/output/input_97190704.js @@ -1,5 +1,5 @@ -(globalThis["utooChunk_async_chunk_test"] || (globalThis["utooChunk_async_chunk_test"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -476, ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +476, (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__976__ = __turbopack_context__.i(976); @@ -12,7 +12,7 @@ var __TURBOPACK__imported__module__743__ = __turbopack_context__.i(743); (0, __TURBOPACK__imported__module__402__["bar"])(true); __turbopack_context__.s([]); }), -976, ((__turbopack_context__) => { +976, (function(__turbopack_context__) { "use strict"; function foo(value) { diff --git a/crates/pack-tests/tests/snapshot/async_chunk/output/main.js b/crates/pack-tests/tests/snapshot/async_chunk/output/main.js index 2040359f2..858e3258f 100644 --- a/crates/pack-tests/tests/snapshot/async_chunk/output/main.js +++ b/crates/pack-tests/tests/snapshot/async_chunk/output/main.js @@ -1,4 +1,4 @@ -(globalThis["utooChunk_async_chunk_test"] || (globalThis["utooChunk_async_chunk_test"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_async_chunk_test"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_86dfc83f.js"],"runtimeModuleIds":[545]} ]); diff --git a/crates/pack-tests/tests/snapshot/async_chunk/output/stats.json b/crates/pack-tests/tests/snapshot/async_chunk/output/stats.json index 089ee5cf2..1a7e87e7a 100644 --- a/crates/pack-tests/tests/snapshot/async_chunk/output/stats.json +++ b/crates/pack-tests/tests/snapshot/async_chunk/output/stats.json @@ -23,7 +23,7 @@ "entry": false, "recorded": false, "id": "input_86dfc83f.js", - "size": 1045, + "size": 1428, "hash": "", "files": [ "input_86dfc83f.js" @@ -47,7 +47,7 @@ "entry": false, "recorded": false, "id": "input_97190704.js", - "size": 795, + "size": 1141, "hash": "", "files": [ "input_97190704.js" @@ -59,7 +59,7 @@ "type": "asset", "name": "input_86dfc83f.js", "info": {}, - "size": 1045, + "size": 1428, "emitted": false, "comparedForEmit": false, "cached": false, @@ -83,7 +83,7 @@ "type": "asset", "name": "input_97190704.js", "info": {}, - "size": 795, + "size": 1141, "emitted": false, "comparedForEmit": false, "cached": false, diff --git a/crates/pack-tests/tests/snapshot/basic/alias/output/_project___de7ba625.js b/crates/pack-tests/tests/snapshot/basic/alias/output/_project___de7ba625.js index 1ad2e2abc..0ed3fb68f 100644 --- a/crates/pack-tests/tests/snapshot/basic/alias/output/_project___de7ba625.js +++ b/crates/pack-tests/tests/snapshot/basic/alias/output/_project___de7ba625.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/basic/alias/input/a.ts [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/basic/alias/input/a.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const foo = "foo"; @@ -17,7 +17,7 @@ __turbopack_context__.s([ foo ]); }), -"[project]/node_modules/alias-pkg/index.js [client] (ecmascript) ", ((__turbopack_context__) => { +"[project]/node_modules/alias-pkg/index.js [client] (ecmascript) ", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/basic/alias/input/a.ts [client] (ecmascript)"); @@ -31,7 +31,7 @@ __turbopack_context__.s([ aliasPkg ]); }), -"[project]/basic/alias/input/a.ts [client] (ecmascript) ", ((__turbopack_context__) => { +"[project]/basic/alias/input/a.ts [client] (ecmascript) ", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/basic/alias/input/a.ts [client] (ecmascript)"); @@ -40,7 +40,7 @@ __turbopack_context__.s([ ()=>__TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__["a"] ]); }), -"[project]/basic/alias/input/b.js [client] (ecmascript) ", ((__turbopack_context__) => { +"[project]/basic/alias/input/b.js [client] (ecmascript) ", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$alias$2d$pkg$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/alias-pkg/index.js [client] (ecmascript) "); @@ -50,7 +50,7 @@ console.log(__TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$in ; __turbopack_context__.s([]); }), -"[project]/basic/alias/input/a.ts [client] (ecmascript) ", ((__turbopack_context__) => { +"[project]/basic/alias/input/a.ts [client] (ecmascript) ", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__$3c$export__a__as__aliasA$3e$__ = __turbopack_context__.i("[project]/basic/alias/input/a.ts [client] (ecmascript) "); @@ -59,7 +59,7 @@ __turbopack_context__.s([ ()=>__TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__$3c$export__a__as__aliasA$3e$__["aliasA"] ]); }), -"[project]/node_modules/browserslist/browser.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/browserslist/browser.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const a = "this is browser"; @@ -69,7 +69,7 @@ __turbopack_context__.s([ a ]); }), -"[project]/node_modules/browserslist/index.js [client] (ecmascript) ", ((__turbopack_context__) => { +"[project]/node_modules/browserslist/index.js [client] (ecmascript) ", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$browserslist$2f$browser$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/browserslist/browser.js [client] (ecmascript)"); @@ -77,13 +77,13 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$browserslist ; __turbopack_context__.s([]); }), -"[project]/basic/alias/input/index.less?modules [client] (css module)", ((__turbopack_context__) => { +"[project]/basic/alias/input/index.less?modules [client] (css module)", (function(__turbopack_context__) { __turbopack_context__.v({ "nav": "index-less__qOlY2a__nav", }); }), -"[project]/basic/alias/input/a.ts?query [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/alias/input/a.ts?query [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const foo = "foo"; @@ -95,7 +95,7 @@ __turbopack_context__.s([ a ]); }), -"[project]/output/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/output/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const output = "output"; @@ -105,7 +105,7 @@ __turbopack_context__.s([ output ]); }), -"[project]/basic/alias/input/runtime.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/alias/input/runtime.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const runtime = "runtime"; @@ -115,13 +115,13 @@ __turbopack_context__.s([ runtime ]); }), -"[project]/basic/alias/input/x.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/alias/input/x.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const x = 'x'; __turbopack_context__.s([]); }), -"[project]/basic/alias/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/alias/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$alias$2f$input$2f$a$2e$ts__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/basic/alias/input/a.ts [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/basic/alias/output/main.js b/crates/pack-tests/tests/snapshot/basic/alias/output/main.js index f01804179..453a4e73f 100644 --- a/crates/pack-tests/tests/snapshot/basic/alias/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/alias/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___de7ba625.js","input_index_less_cbfc5ad5.css"],"runtimeModuleIds":["[project]/basic/alias/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/input_index_eff851b8.js b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/input_index_eff851b8.js index bfaf4ec95..b9aa0a02f 100644 --- a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/input_index_eff851b8.js +++ b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/input_index_eff851b8.js @@ -1,5 +1,5 @@ -(globalThis["utooChunk_myApp"] || (globalThis["utooChunk_myApp"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/basic/chunk_loading_global/input/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_myApp"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_myApp"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/basic/chunk_loading_global/input/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log('ChunkingLoadingGlobal test'); }), diff --git a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/main.js b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/main.js index 1753f5280..e913dc5a8 100644 --- a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/main.js @@ -1,4 +1,4 @@ -(globalThis["utooChunk_myApp"] || (globalThis["utooChunk_myApp"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_myApp"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["utooChunk_myApp"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_eff851b8.js"],"runtimeModuleIds":["[project]/basic/chunk_loading_global/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/stats.json b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/stats.json index e166cb67e..5b93b3c60 100644 --- a/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/stats.json +++ b/crates/pack-tests/tests/snapshot/basic/chunk_loading_global/output/stats.json @@ -23,7 +23,7 @@ "entry": false, "recorded": false, "id": "input_index_eff851b8.js", - "size": 370, + "size": 711, "hash": "", "files": [ "input_index_eff851b8.js" @@ -47,7 +47,7 @@ "type": "asset", "name": "input_index_eff851b8.js", "info": {}, - "size": 370, + "size": 711, "emitted": false, "comparedForEmit": false, "cached": false, diff --git a/crates/pack-tests/tests/snapshot/basic/copy/output/input_index_d913cfd2.js b/crates/pack-tests/tests/snapshot/basic/copy/output/input_index_d913cfd2.js index 2180898f6..0f4e8b1b7 100644 --- a/crates/pack-tests/tests/snapshot/basic/copy/output/input_index_d913cfd2.js +++ b/crates/pack-tests/tests/snapshot/basic/copy/output/input_index_d913cfd2.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/basic/copy/input/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/basic/copy/input/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log('copy example'); }), diff --git a/crates/pack-tests/tests/snapshot/basic/copy/output/main.js b/crates/pack-tests/tests/snapshot/basic/copy/output/main.js index 66009252c..cee633793 100644 --- a/crates/pack-tests/tests/snapshot/basic/copy/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/copy/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_d913cfd2.js"],"runtimeModuleIds":["[project]/basic/copy/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/copy/output/stats.json b/crates/pack-tests/tests/snapshot/basic/copy/output/stats.json index 28e15507a..9bf5f32a8 100644 --- a/crates/pack-tests/tests/snapshot/basic/copy/output/stats.json +++ b/crates/pack-tests/tests/snapshot/basic/copy/output/stats.json @@ -23,7 +23,7 @@ "entry": false, "recorded": false, "id": "input_index_d913cfd2.js", - "size": 328, + "size": 669, "hash": "", "files": [ "input_index_d913cfd2.js" @@ -47,7 +47,7 @@ "type": "asset", "name": "input_index_d913cfd2.js", "info": {}, - "size": 328, + "size": 669, "emitted": false, "comparedForEmit": false, "cached": false, diff --git a/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/_project__basic_foreign_jsx_transform_5da2b40c.js b/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/_project__basic_foreign_jsx_transform_5da2b40c.js index 9fd427005..83479da64 100644 --- a/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/_project__basic_foreign_jsx_transform_5da2b40c.js +++ b/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/_project__basic_foreign_jsx_transform_5da2b40c.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/basic/foreign_jsx_transform/node_modules/react/index.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/basic/foreign_jsx_transform/node_modules/react/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const React = { @@ -17,14 +17,14 @@ __turbopack_context__.s([ __TURBOPACK__default__export__ ]); }), -"[project]/basic/foreign_jsx_transform/node_modules/foreign-jsx-transform/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/foreign_jsx_transform/node_modules/foreign-jsx-transform/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; /** @jsx jsx */ var a = 1; var __TURBOPACK__default__export__ = a; __turbopack_context__.s([]); }), -"[project]/basic/foreign_jsx_transform/input/comp.tsx [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/foreign_jsx_transform/input/comp.tsx [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$foreign_jsx_transform$2f$node_modules$2f$react$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/basic/foreign_jsx_transform/node_modules/react/index.js [client] (ecmascript)"); @@ -37,7 +37,7 @@ __turbopack_context__.s([ __TURBOPACK__default__export__ ]); }), -"[project]/basic/foreign_jsx_transform/input/index.tsx [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/foreign_jsx_transform/input/index.tsx [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$basic$2f$foreign_jsx_transform$2f$node_modules$2f$react$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/basic/foreign_jsx_transform/node_modules/react/index.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/main.js b/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/main.js index a5a02cf74..15e57359c 100644 --- a/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/foreign_jsx_transform/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project__basic_foreign_jsx_transform_5da2b40c.js"],"runtimeModuleIds":["[project]/basic/foreign_jsx_transform/input/index.tsx [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/jsx/output/_project___e95e9ae8.js b/crates/pack-tests/tests/snapshot/basic/jsx/output/_project___e95e9ae8.js index bf080dfa6..2ed27908a 100644 --- a/crates/pack-tests/tests/snapshot/basic/jsx/output/_project___e95e9ae8.js +++ b/crates/pack-tests/tests/snapshot/basic/jsx/output/_project___e95e9ae8.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/@emotion/react/jsx-runtime.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/node_modules/@emotion/react/jsx-runtime.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function jsx() { @@ -14,7 +14,7 @@ __turbopack_context__.s([ jsx ]); }), -"[project]/node_modules/@emotion/react/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/@emotion/react/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function jsx() { @@ -31,7 +31,7 @@ function keyframes() { } __turbopack_context__.s([]); }), -"[project]/basic/jsx/input/index.tsx [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/jsx/input/index.tsx [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$emotion$2f$react$2f$jsx$2d$runtime$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@emotion/react/jsx-runtime.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/basic/jsx/output/main.js b/crates/pack-tests/tests/snapshot/basic/jsx/output/main.js index 932106146..923712181 100644 --- a/crates/pack-tests/tests/snapshot/basic/jsx/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/jsx/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___e95e9ae8.js"],"runtimeModuleIds":["[project]/basic/jsx/input/index.tsx [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/minify/output/input_index_8ff6f61b.js b/crates/pack-tests/tests/snapshot/basic/minify/output/input_index_8ff6f61b.js index da9d64816..01e7dc2af 100644 --- a/crates/pack-tests/tests/snapshot/basic/minify/output/input_index_8ff6f61b.js +++ b/crates/pack-tests/tests/snapshot/basic/minify/output/input_index_8ff6f61b.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -71, ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +71, (function(__turbopack_context__, module, exports) { const inlined = 3; const message = getMessage(); diff --git a/crates/pack-tests/tests/snapshot/basic/minify/output/main.js b/crates/pack-tests/tests/snapshot/basic/minify/output/main.js index 9d14753e7..be07e4e40 100644 --- a/crates/pack-tests/tests/snapshot/basic/minify/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/minify/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_8ff6f61b.js"],"runtimeModuleIds":[71]} ]); diff --git a/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/_project___9198e48d.js b/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/_project___9198e48d.js index 7521e5f56..dbf8fa50f 100644 --- a/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/_project___9198e48d.js +++ b/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/_project___9198e48d.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function jsx() { @@ -14,7 +14,7 @@ __turbopack_context__.s([ jsx ]); }), -"[project]/basic/no_named_export_default/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/basic/no_named_export_default/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2f$jsx$2d$runtime$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/main.js b/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/main.js index 294fb9390..b47522772 100644 --- a/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/main.js +++ b/crates/pack-tests/tests/snapshot/basic/no_named_export_default/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___9198e48d.js"],"runtimeModuleIds":["[project]/basic/no_named_export_default/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/circular_dependency/output/input_509894e7.js b/crates/pack-tests/tests/snapshot/circular_dependency/output/input_509894e7.js index 97997c95e..d25fa56fa 100644 --- a/crates/pack-tests/tests/snapshot/circular_dependency/output/input_509894e7.js +++ b/crates/pack-tests/tests/snapshot/circular_dependency/output/input_509894e7.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/circular_dependency/input/a.ts [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/circular_dependency/input/a.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; __turbopack_context__.s([ @@ -12,7 +12,7 @@ __TURBOPACK__imported__module__$5b$project$5d2f$circular_dependency$2f$input$2f$ const c = 1; var __TURBOPACK__default__export__ = c; }), -"[project]/circular_dependency/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/circular_dependency/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; __turbopack_context__.s([ diff --git a/crates/pack-tests/tests/snapshot/circular_dependency/output/main.js b/crates/pack-tests/tests/snapshot/circular_dependency/output/main.js index 72e709aca..f22194560 100644 --- a/crates/pack-tests/tests/snapshot/circular_dependency/output/main.js +++ b/crates/pack-tests/tests/snapshot/circular_dependency/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_509894e7.js"],"runtimeModuleIds":["[project]/circular_dependency/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/input_9640720b.js b/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/input_9640720b.js index cf10b12d4..1361f096a 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/input_9640720b.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/input_9640720b.js @@ -1,9 +1,9 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/concatenate_modules/duplicate-imports/input/shared.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/concatenate_modules/duplicate-imports/input/shared.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { module.exports = 'shared'; }), -"[project]/concatenate_modules/duplicate-imports/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/concatenate_modules/duplicate-imports/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/duplicate-imports/input/index.js [client] (ecmascript) diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/main.js b/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/main.js index 1a6a10941..3df795f46 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/main.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/duplicate-imports/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_9640720b.js"],"runtimeModuleIds":["[project]/concatenate_modules/duplicate-imports/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/library-shared/output/main.js b/crates/pack-tests/tests/snapshot/concatenate_modules/library-shared/output/main.js index 1e0812388..a1decf079 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/library-shared/output/main.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/library-shared/output/main.js @@ -3,7 +3,7 @@ })([ ["main.js", -77, ((__turbopack_context__) => { +77, (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/library-shared/input/y/middle.js [library-client] (ecmascript) @@ -16,7 +16,7 @@ console.log('y', __TURBOPACK__imported__module__148__["default"]); ; __turbopack_context__.s([], 77); }), -148, ((__turbopack_context__) => { +148, (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/library-shared/input/big/index.js [library-client] (ecmascript) @@ -85,11 +85,11 @@ __turbopack_context__.s([ __TURBOPACK__default__export__1 ], 148); }), -554, ((__turbopack_context__, module, exports) => { +554, (function(__turbopack_context__, module, exports) { setTimeout(()=>Promise.resolve().then(()=>__turbopack_context__.i(77)), 1000); }), -498, ((__turbopack_context__) => { +498, (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__855__ = __turbopack_context__.i(855); @@ -98,11 +98,11 @@ var __TURBOPACK__imported__module__554__ = __turbopack_context__.i(554); ; __turbopack_context__.s([]); }), -855, ((__turbopack_context__, module, exports) => { +855, (function(__turbopack_context__, module, exports) { setTimeout(()=>Promise.resolve().then(()=>__turbopack_context__.i(888)), 500); }), -888, ((__turbopack_context__) => { +888, (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__148__ = __turbopack_context__.i(148); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/input_index_126c26d2.js b/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/input_index_126c26d2.js index 755202529..869d58b49 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/input_index_126c26d2.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/input_index_126c26d2.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/concatenate_modules/merged_additional_ids/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/concatenate_modules/merged_additional_ids/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/merged_additional_ids/input/index.js [client] (ecmascript) diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/main.js b/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/main.js index 21b2b0dfb..d0b68cb90 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/main.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/merged_additional_ids/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_126c26d2.js"],"runtimeModuleIds":["[project]/concatenate_modules/merged_additional_ids/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/a.js b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/a.js index 52f69bad7..4394c9581 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/a.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/a.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_fb44e3f3.js"],"runtimeModuleIds":["[project]/concatenate_modules/side-effects-import/input/a.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/b.js b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/b.js index d376b7fc6..7498d40c1 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/b.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/b.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_755247f8.js"],"runtimeModuleIds":["[project]/concatenate_modules/side-effects-import/input/b.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_755247f8.js b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_755247f8.js index 9b24f1aeb..d6e42b793 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_755247f8.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_755247f8.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/concatenate_modules/side-effects-import/input/b.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/concatenate_modules/side-effects-import/input/b.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/side-effects-import/input/b.js [client] (ecmascript) @@ -18,11 +18,11 @@ console.log("b2"); ; __turbopack_context__.s([], "[project]/concatenate_modules/side-effects-import/input/b.js [client] (ecmascript)"); }), -"[project]/concatenate_modules/side-effects-import/input/shared1.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/concatenate_modules/side-effects-import/input/shared1.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log("shared1"); }), -"[project]/concatenate_modules/side-effects-import/input/shared2.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/concatenate_modules/side-effects-import/input/shared2.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log("shared2"); }), diff --git a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_fb44e3f3.js b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_fb44e3f3.js index d89d5386b..587cc1784 100644 --- a/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_fb44e3f3.js +++ b/crates/pack-tests/tests/snapshot/concatenate_modules/side-effects-import/output/input_fb44e3f3.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/concatenate_modules/side-effects-import/input/a.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/concatenate_modules/side-effects-import/input/a.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/concatenate_modules/side-effects-import/input/a.js [client] (ecmascript) @@ -18,11 +18,11 @@ console.log("a2"); ; __turbopack_context__.s([], "[project]/concatenate_modules/side-effects-import/input/a.js [client] (ecmascript)"); }), -"[project]/concatenate_modules/side-effects-import/input/shared1.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/concatenate_modules/side-effects-import/input/shared1.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log("shared1"); }), -"[project]/concatenate_modules/side-effects-import/input/shared2.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/concatenate_modules/side-effects-import/input/shared2.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log("shared2"); }), diff --git a/crates/pack-tests/tests/snapshot/define/basic/output/input_index_ts_d08225da.js b/crates/pack-tests/tests/snapshot/define/basic/output/input_index_ts_d08225da.js index bc839a41e..853107d5f 100644 --- a/crates/pack-tests/tests/snapshot/define/basic/output/input_index_ts_d08225da.js +++ b/crates/pack-tests/tests/snapshot/define/basic/output/input_index_ts_d08225da.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/define/basic/input/index.ts [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/define/basic/input/index.ts [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log(("TURBOPACK compile-time value", "aaa")); console.log(("TURBOPACK compile-time value", "bbb")); diff --git a/crates/pack-tests/tests/snapshot/define/basic/output/main.js b/crates/pack-tests/tests/snapshot/define/basic/output/main.js index e48ccf9fe..fcc2f9def 100644 --- a/crates/pack-tests/tests/snapshot/define/basic/output/main.js +++ b/crates/pack-tests/tests/snapshot/define/basic/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_ts_d08225da.js"],"runtimeModuleIds":["[project]/define/basic/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/define/complex/output/input_index_ts_291b4280.js b/crates/pack-tests/tests/snapshot/define/complex/output/input_index_ts_291b4280.js index 54b92da33..389eed5b6 100644 --- a/crates/pack-tests/tests/snapshot/define/complex/output/input_index_ts_291b4280.js +++ b/crates/pack-tests/tests/snapshot/define/complex/output/input_index_ts_291b4280.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/define/complex/input/index.ts [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/define/complex/input/index.ts [client] (ecmascript)", (function(__turbopack_context__, module, exports) { console.log(("TURBOPACK compile-time value", { "TEST1": ("TURBOPACK compile-time value", "TEST1_VALUE"), diff --git a/crates/pack-tests/tests/snapshot/define/complex/output/main.js b/crates/pack-tests/tests/snapshot/define/complex/output/main.js index 0a9ca9272..d296b26d7 100644 --- a/crates/pack-tests/tests/snapshot/define/complex/output/main.js +++ b/crates/pack-tests/tests/snapshot/define/complex/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_ts_291b4280.js"],"runtimeModuleIds":["[project]/define/complex/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/dynamic_import/library-chunk/output/main.js b/crates/pack-tests/tests/snapshot/dynamic_import/library-chunk/output/main.js index 7cd0fbe9b..36bb36868 100644 --- a/crates/pack-tests/tests/snapshot/dynamic_import/library-chunk/output/main.js +++ b/crates/pack-tests/tests/snapshot/dynamic_import/library-chunk/output/main.js @@ -3,7 +3,7 @@ })([ ["main.js", -"[project]/dynamic_import/library-chunk/input/a.ts [library-client] (ecmascript)", ((__turbopack_context__) => { +"[project]/dynamic_import/library-chunk/input/a.ts [library-client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const a = "a"; @@ -13,7 +13,7 @@ __turbopack_context__.s([ a ]); }), -"[project]/dynamic_import/library-chunk/input/index.ts [library-client] (ecmascript)", ((__turbopack_context__) => { +"[project]/dynamic_import/library-chunk/input/index.ts [library-client] (ecmascript)", (function(__turbopack_context__) { "use strict"; async function Test() { diff --git a/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/input_index_ts_899b6ed3.js b/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/input_index_ts_899b6ed3.js index c018195f9..09e08508b 100644 --- a/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/input_index_ts_899b6ed3.js +++ b/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/input_index_ts_899b6ed3.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/dynamic_import/very-dynamic/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/dynamic_import/very-dynamic/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; async function importUrl(url) { diff --git a/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/main.js b/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/main.js index a5b0dad16..a1a1813ee 100644 --- a/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/main.js +++ b/crates/pack-tests/tests/snapshot/dynamic_import/very-dynamic/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_ts_899b6ed3.js"],"runtimeModuleIds":["[project]/dynamic_import/very-dynamic/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_externals____2fc6bb03.js b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_externals____2fc6bb03.js index e5c894297..1b895a9d8 100644 --- a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_externals____2fc6bb03.js +++ b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_externals____2fc6bb03.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { diff --git a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_root-of-the-server___d1c9390f.js b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_root-of-the-server___d1c9390f.js index 11ed9005f..5071a5eb1 100644 --- a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_root-of-the-server___d1c9390f.js +++ b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/_root-of-the-server___d1c9390f.js @@ -1,15 +1,15 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script, async loader)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script, async loader)", (function(__turbopack_context__) { -__turbopack_context__.v((parentImport) => { +__turbopack_context__.v(function(parentImport) { return Promise.all([ "_externals____2fc6bb03.js" -].map((chunk) => __turbopack_context__.l(chunk))).then(() => { +].map(function(chunk) { return __turbopack_context__.l(chunk); })).then(function() { return parentImport("[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)"); }); }); }), -"[project]/externals/async-script-externals/input/index.ts [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/externals/async-script-externals/input/index.ts [client] (ecmascript)", (function(__turbopack_context__, module, exports) { const func = async ()=>{ // @ts-ignore diff --git a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/main.js b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/main.js index 2c73a76d2..5e71b3bf3 100644 --- a/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/main.js +++ b/crates/pack-tests/tests/snapshot/externals/async-script-externals/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___d1c9390f.js"],"runtimeModuleIds":["[project]/externals/async-script-externals/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/externals/basic/output/_root-of-the-server___3b647096.js b/crates/pack-tests/tests/snapshot/externals/basic/output/_root-of-the-server___3b647096.js index 9e6dee4de..1697061d0 100644 --- a/crates/pack-tests/tests/snapshot/externals/basic/output/_root-of-the-server___3b647096.js +++ b/crates/pack-tests/tests/snapshot/externals/basic/output/_root-of-the-server___3b647096.js @@ -1,24 +1,24 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/bar [external] (bar, global)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/bar [external] (bar, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["bar"]; __turbopack_context__.v(mod); }), -"[externals]/bar [external] (bar, cjs)", ((__turbopack_context__, module, exports) => { +"[externals]/bar [external] (bar, cjs)", (function(__turbopack_context__, module, exports) { const mod = __turbopack_context__.x("bar", () => require("bar")); module.exports = mod; }), -"[externals]/bar_require2 [external] (bar_require2, cjs)", ((__turbopack_context__, module, exports) => { +"[externals]/bar_require2 [external] (bar_require2, cjs)", (function(__turbopack_context__, module, exports) { const mod = __turbopack_context__.x("bar_require2", () => require("bar_require2")); module.exports = mod; }), -"[externals]/bar [external] (bar, esm_import)", ((__turbopack_context__) => { +"[externals]/bar [external] (bar, esm_import)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { @@ -28,7 +28,7 @@ const mod = await __turbopack_context__.y("bar"); __turbopack_context__.n(mod); __turbopack_async_result__(); } catch(e) { __turbopack_async_result__(e); } }, true);}), -"[externals]/bar_import2 [external] (bar_import2, esm_import)", ((__turbopack_context__) => { +"[externals]/bar_import2 [external] (bar_import2, esm_import)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { @@ -38,7 +38,7 @@ const mod = await __turbopack_context__.y("bar_import2"); __turbopack_context__.n(mod); __turbopack_async_result__(); } catch(e) { __turbopack_async_result__(e); } }, true);}), -"[externals]/bar_script1 [external] (bar_script1@https://example.com/lib/script.js, script)", ((__turbopack_context__) => { +"[externals]/bar_script1 [external] (bar_script1@https://example.com/lib/script.js, script)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { @@ -61,7 +61,7 @@ const mod = await (async () => { __turbopack_context__.v(mod); __turbopack_async_result__(); } catch(e) { __turbopack_async_result__(e); } }, true);}), -"[externals]/bar_script2 [external] (bar_script2@https://example.com/lib/script2.js, script)", ((__turbopack_context__) => { +"[externals]/bar_script2 [external] (bar_script2@https://example.com/lib/script2.js, script)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { @@ -84,7 +84,7 @@ const mod = await (async () => { __turbopack_context__.v(mod); __turbopack_async_result__(); } catch(e) { __turbopack_async_result__(e); } }, true);}), -"[project]/externals/basic/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/externals/basic/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { diff --git a/crates/pack-tests/tests/snapshot/externals/basic/output/main.js b/crates/pack-tests/tests/snapshot/externals/basic/output/main.js index a236553e9..dd7fa8fd2 100644 --- a/crates/pack-tests/tests/snapshot/externals/basic/output/main.js +++ b/crates/pack-tests/tests/snapshot/externals/basic/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___3b647096.js"],"runtimeModuleIds":["[project]/externals/basic/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/externals/script/output/_externals____2fc6bb03.js b/crates/pack-tests/tests/snapshot/externals/script/output/_externals____2fc6bb03.js index e5c894297..1b895a9d8 100644 --- a/crates/pack-tests/tests/snapshot/externals/script/output/_externals____2fc6bb03.js +++ b/crates/pack-tests/tests/snapshot/externals/script/output/_externals____2fc6bb03.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)", (function(__turbopack_context__) { "use strict"; return __turbopack_context__.a(async (__turbopack_handle_async_dependencies__, __turbopack_async_result__) => { try { diff --git a/crates/pack-tests/tests/snapshot/externals/script/output/_root-of-the-server___d9789257.js b/crates/pack-tests/tests/snapshot/externals/script/output/_root-of-the-server___d9789257.js index 12071cda5..25aa1fa8d 100644 --- a/crates/pack-tests/tests/snapshot/externals/script/output/_root-of-the-server___d9789257.js +++ b/crates/pack-tests/tests/snapshot/externals/script/output/_root-of-the-server___d9789257.js @@ -1,15 +1,15 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script, async loader)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script, async loader)", (function(__turbopack_context__) { -__turbopack_context__.v((parentImport) => { +__turbopack_context__.v(function(parentImport) { return Promise.all([ "_externals____2fc6bb03.js" -].map((chunk) => __turbopack_context__.l(chunk))).then(() => { +].map(function(chunk) { return __turbopack_context__.l(chunk); })).then(function() { return parentImport("[externals]/_ [external] (_@https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js, script)"); }); }); }), -"[project]/externals/script/input/index.ts [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/externals/script/input/index.ts [client] (ecmascript)", (function(__turbopack_context__, module, exports) { const func = async ()=>{ // @ts-ignore diff --git a/crates/pack-tests/tests/snapshot/externals/script/output/main.js b/crates/pack-tests/tests/snapshot/externals/script/output/main.js index 9653d28da..37b7d3d94 100644 --- a/crates/pack-tests/tests/snapshot/externals/script/output/main.js +++ b/crates/pack-tests/tests/snapshot/externals/script/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___d9789257.js"],"runtimeModuleIds":["[project]/externals/script/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/externals/subpath/output/_root-of-the-server___ddd307f3.js b/crates/pack-tests/tests/snapshot/externals/subpath/output/_root-of-the-server___ddd307f3.js index 46aa9f553..caab6ad2e 100644 --- a/crates/pack-tests/tests/snapshot/externals/subpath/output/_root-of-the-server___ddd307f3.js +++ b/crates/pack-tests/tests/snapshot/externals/subpath/output/_root-of-the-server___ddd307f3.js @@ -1,47 +1,47 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/antd [external] (antd, global)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/antd [external] (antd, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["antd"]; __turbopack_context__.v(mod); }), -"[externals]/antd Button [external] (antd Button, global)", ((__turbopack_context__) => { +"[externals]/antd Button [external] (antd Button, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["antd"]["Button"]; __turbopack_context__.v(mod); }), -"[externals]/antd DatePicker [external] (antd DatePicker, global)", ((__turbopack_context__) => { +"[externals]/antd DatePicker [external] (antd DatePicker, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["antd"]["DatePicker"]; __turbopack_context__.v(mod); }), -"[externals]/antd Input Group [external] (antd Input Group, global)", ((__turbopack_context__) => { +"[externals]/antd Input Group [external] (antd Input Group, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["antd"]["Input"]["Group"]; __turbopack_context__.v(mod); }), -"[externals]/antd version [external] (antd version, global)", ((__turbopack_context__) => { +"[externals]/antd version [external] (antd version, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["antd"]["version"]; __turbopack_context__.v(mod); }), -"[externals]/emotionReact [external] (emotionReact, global)", ((__turbopack_context__) => { +"[externals]/emotionReact [external] (emotionReact, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["emotionReact"]; __turbopack_context__.v(mod); }), -"[project]/externals/subpath/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/externals/subpath/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$externals$5d2f$antd__$5b$external$5d$__$28$antd$2c$__global$29$__ = __turbopack_context__.i("[externals]/antd [external] (antd, global)"); diff --git a/crates/pack-tests/tests/snapshot/externals/subpath/output/main.js b/crates/pack-tests/tests/snapshot/externals/subpath/output/main.js index b16a1cea7..320cbc7b3 100644 --- a/crates/pack-tests/tests/snapshot/externals/subpath/output/main.js +++ b/crates/pack-tests/tests/snapshot/externals/subpath/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___ddd307f3.js"],"runtimeModuleIds":["[project]/externals/subpath/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/externals/with-alias/output/_root-of-the-server___1347bc4c.js b/crates/pack-tests/tests/snapshot/externals/with-alias/output/_root-of-the-server___1347bc4c.js index dca7e8b96..c249e5164 100644 --- a/crates/pack-tests/tests/snapshot/externals/with-alias/output/_root-of-the-server___1347bc4c.js +++ b/crates/pack-tests/tests/snapshot/externals/with-alias/output/_root-of-the-server___1347bc4c.js @@ -1,12 +1,12 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[externals]/Antd [external] (Antd, global)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[externals]/Antd [external] (Antd, global)", (function(__turbopack_context__) { "use strict"; const mod = globalThis["Antd"]; __turbopack_context__.v(mod); }), -"[project]/externals/with-alias/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/externals/with-alias/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$externals$5d2f$Antd__$5b$external$5d$__$28$Antd$2c$__global$29$__ = __turbopack_context__.i("[externals]/Antd [external] (Antd, global)"); diff --git a/crates/pack-tests/tests/snapshot/externals/with-alias/output/main.js b/crates/pack-tests/tests/snapshot/externals/with-alias/output/main.js index f5337c0c4..36ea24af8 100644 --- a/crates/pack-tests/tests/snapshot/externals/with-alias/output/main.js +++ b/crates/pack-tests/tests/snapshot/externals/with-alias/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___1347bc4c.js"],"runtimeModuleIds":["[project]/externals/with-alias/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/node_polyfill/output/_root-of-the-server___27aa7c0e.js b/crates/pack-tests/tests/snapshot/node_polyfill/output/_root-of-the-server___27aa7c0e.js index e176c904b..df4c182c3 100644 --- a/crates/pack-tests/tests/snapshot/node_polyfill/output/_root-of-the-server___27aa7c0e.js +++ b/crates/pack-tests/tests/snapshot/node_polyfill/output/_root-of-the-server___27aa7c0e.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[@utoo/pack-runtime]/node-polyfills/assert/assert.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[@utoo/pack-runtime]/node-polyfills/assert/assert.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -3890,7 +3890,7 @@ module.exports = r; })(); }), -"[@utoo/pack-runtime]/node-polyfills/buffer/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/buffer/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -5415,7 +5415,7 @@ module.exports = t; })(); }), -"[@utoo/pack-runtime]/node-polyfills/process/browser.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/process/browser.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -5600,7 +5600,7 @@ module.exports = r; })(); }), -"[project]/node_modules/browser-polyfill/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/browser-polyfill/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; const process = __turbopack_context__.r("[@utoo/pack-runtime]/node-polyfills/process/browser.js [client] (ecmascript)"); @@ -5611,7 +5611,7 @@ __turbopack_context__.s([ process ]); }), -"[@utoo/pack-runtime]/node-polyfills/querystring-es3/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/querystring-es3/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { "use strict"; @@ -5747,7 +5747,7 @@ __turbopack_context__.s([ module.exports = n; })(); }), -"[@utoo/pack-runtime]/node-polyfills/native-url/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/native-url/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -5860,7 +5860,7 @@ __turbopack_context__.s([ module.exports = o; })(); }), -"[@utoo/pack-runtime]/node-polyfills/setimmediate/setImmediate.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/setimmediate/setImmediate.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -6018,7 +6018,7 @@ __turbopack_context__.s([ module.exports = t; })(); }), -"[@utoo/pack-runtime]/node-polyfills/timers-browserify/main.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/timers-browserify/main.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -6093,7 +6093,7 @@ __turbopack_context__.s([ module.exports = i; })(); }), -"[@utoo/pack-runtime]/node-polyfills/events/events.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/events/events.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { "use strict"; @@ -6478,7 +6478,7 @@ __turbopack_context__.s([ module.exports = n; })(); }), -"[@utoo/pack-runtime]/node-polyfills/util/util.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/util/util.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var r = { @@ -8358,7 +8358,7 @@ __turbopack_context__.s([ module.exports = t; })(); }), -"[@utoo/pack-runtime]/node-polyfills/stream-browserify/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/stream-browserify/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { (function() { var e = { @@ -11083,11 +11083,11 @@ __turbopack_context__.s([ module.exports = r; })(); }), -"[@utoo/pack-runtime]/node-polyfills/empty/empty.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[@utoo/pack-runtime]/node-polyfills/empty/empty.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { module.exports = {}; }), -"[project]/node_polyfill/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_polyfill/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b40$utoo$2f$pack$2d$runtime$5d2f$node$2d$polyfills$2f$assert$2f$assert$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[@utoo/pack-runtime]/node-polyfills/assert/assert.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/node_polyfill/output/main.js b/crates/pack-tests/tests/snapshot/node_polyfill/output/main.js index 983fb964d..77d0cda6b 100644 --- a/crates/pack-tests/tests/snapshot/node_polyfill/output/main.js +++ b/crates/pack-tests/tests/snapshot/node_polyfill/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_root-of-the-server___27aa7c0e.js"],"runtimeModuleIds":["[project]/node_polyfill/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/_project___2c8364ab.js b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/_project___2c8364ab.js index 5937f97f2..7496d5407 100644 --- a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/_project___2c8364ab.js +++ b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/_project___2c8364ab.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/antd/es/ButtonGroup/index.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/node_modules/antd/es/ButtonGroup/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function ButtonGroup() { @@ -11,7 +11,7 @@ __turbopack_context__.s([ ButtonGroup ]); }), -"[project]/node_modules/antd/es/DatePicker/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/antd/es/DatePicker/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function DatePicker() { @@ -23,7 +23,7 @@ __turbopack_context__.s([ DatePicker ]); }), -"[project]/optimization/modularize_imports_camel_case/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/optimization/modularize_imports_camel_case/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$antd$2f$es$2f$ButtonGroup$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/antd/es/ButtonGroup/index.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/main.js b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/main.js index 9dd1107be..640718509 100644 --- a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/main.js +++ b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_camel_case/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___2c8364ab.js"],"runtimeModuleIds":["[project]/optimization/modularize_imports_camel_case/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/_project___2fe66d90.js b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/_project___2fe66d90.js index 818e401a7..64f7c2186 100644 --- a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/_project___2fe66d90.js +++ b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/_project___2fe66d90.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/antd/es/button/index.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/node_modules/antd/es/button/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function Button() { @@ -11,13 +11,13 @@ __turbopack_context__.s([ Button ]); }), -"[project]/node_modules/antd/es/button/style/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/antd/es/button/style/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__default__export__ = "button-style"; __turbopack_context__.s([]); }), -"[project]/node_modules/antd/es/date-picker/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/antd/es/date-picker/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; function DatePicker() { @@ -29,13 +29,13 @@ __turbopack_context__.s([ DatePicker ]); }), -"[project]/node_modules/antd/es/date-picker/style/index.js [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/node_modules/antd/es/date-picker/style/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__default__export__ = "date-picker-style"; __turbopack_context__.s([]); }), -"[project]/optimization/modularize_imports_keba_case/input/index.ts [client] (ecmascript)", ((__turbopack_context__) => { +"[project]/optimization/modularize_imports_keba_case/input/index.ts [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$antd$2f$es$2f$button$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/antd/es/button/index.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/main.js b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/main.js index cb1ea9c6b..0f81e3d0f 100644 --- a/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/main.js +++ b/crates/pack-tests/tests/snapshot/optimization/modularize_imports_keba_case/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___2fe66d90.js"],"runtimeModuleIds":["[project]/optimization/modularize_imports_keba_case/input/index.ts [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/optimization/remove_console/output/input_index_51e50e07.js b/crates/pack-tests/tests/snapshot/optimization/remove_console/output/input_index_51e50e07.js index 96f16e31b..2fd4c7019 100644 --- a/crates/pack-tests/tests/snapshot/optimization/remove_console/output/input_index_51e50e07.js +++ b/crates/pack-tests/tests/snapshot/optimization/remove_console/output/input_index_51e50e07.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -69, ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +69, (function(__turbopack_context__) { "use strict"; function main() { diff --git a/crates/pack-tests/tests/snapshot/optimization/remove_console/output/main.js b/crates/pack-tests/tests/snapshot/optimization/remove_console/output/main.js index e5eb05c56..f151ce5ce 100644 --- a/crates/pack-tests/tests/snapshot/optimization/remove_console/output/main.js +++ b/crates/pack-tests/tests/snapshot/optimization/remove_console/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_51e50e07.js"],"runtimeModuleIds":[69]} ]); diff --git a/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/input_index_33dc7bf7.js b/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/input_index_33dc7bf7.js index fd84e5d74..c0810d37e 100644 --- a/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/input_index_33dc7bf7.js +++ b/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/input_index_33dc7bf7.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/optimization/remove_unused_imports_reexport/input/index.js [client] (ecmascript)", ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/optimization/remove_unused_imports_reexport/input/index.js [client] (ecmascript)", (function(__turbopack_context__) { "use strict"; // MERGED MODULE: [project]/optimization/remove_unused_imports_reexport/input/index.js [client] (ecmascript) diff --git a/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/main.js b/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/main.js index 1c63bff98..a540a14d9 100644 --- a/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/main.js +++ b/crates/pack-tests/tests/snapshot/optimization/remove_unused_imports_reexport/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_index_33dc7bf7.js"],"runtimeModuleIds":["[project]/optimization/remove_unused_imports_reexport/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/provider/basic/output/_project___4bea748f.js b/crates/pack-tests/tests/snapshot/provider/basic/output/_project___4bea748f.js index e43dcdbaa..37edcd9e4 100644 --- a/crates/pack-tests/tests/snapshot/provider/basic/output/_project___4bea748f.js +++ b/crates/pack-tests/tests/snapshot/provider/basic/output/_project___4bea748f.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -"[project]/node_modules/jquery/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +"[project]/node_modules/jquery/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { module.exports = function $(selector) { return { @@ -7,7 +7,7 @@ module.exports = function $(selector) { }; }; }), -"[project]/node_modules/buffer-dep/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/node_modules/buffer-dep/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { exports.Buffer = { from: function(str) { @@ -17,7 +17,7 @@ exports.Buffer = { } }; }), -"[project]/provider/basic/input/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { +"[project]/provider/basic/input/index.js [client] (ecmascript)", (function(__turbopack_context__, module, exports) { var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$jquery$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/jquery/index.js [client] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$buffer$2d$dep$2f$index$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/buffer-dep/index.js [client] (ecmascript)"); diff --git a/crates/pack-tests/tests/snapshot/provider/basic/output/main.js b/crates/pack-tests/tests/snapshot/provider/basic/output/main.js index ecaa8cd39..d15342c61 100644 --- a/crates/pack-tests/tests/snapshot/provider/basic/output/main.js +++ b/crates/pack-tests/tests/snapshot/provider/basic/output/main.js @@ -1,4 +1,4 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["_project___4bea748f.js"],"runtimeModuleIds":["[project]/provider/basic/input/index.js [client] (ecmascript)"]} ]); diff --git a/crates/pack-tests/tests/snapshot/public_path/basic/output/input_2d0fce75.js b/crates/pack-tests/tests/snapshot/public_path/basic/output/input_2d0fce75.js index 9c75290c7..757e1b610 100644 --- a/crates/pack-tests/tests/snapshot/public_path/basic/output/input_2d0fce75.js +++ b/crates/pack-tests/tests/snapshot/public_path/basic/output/input_2d0fce75.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -4, ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +4, (function(__turbopack_context__) { "use strict"; var __TURBOPACK__imported__module__19__ = __turbopack_context__.i(19); @@ -25,15 +25,15 @@ __turbopack_context__.s([ loadLazyModule ]); }), -19, ((__turbopack_context__) => { +19, (function(__turbopack_context__) { __turbopack_context__.q("https://cdn.example.com/assets/asset.99aa06d3.jpg");}), -78, ((__turbopack_context__) => { +78, (function(__turbopack_context__) { -__turbopack_context__.v((parentImport) => { +__turbopack_context__.v(function(parentImport) { return Promise.all([ "input_lazy_be895acc.js" -].map((chunk) => __turbopack_context__.l(chunk))).then(() => { +].map(function(chunk) { return __turbopack_context__.l(chunk); })).then(function() { return parentImport(73); }); }); diff --git a/crates/pack-tests/tests/snapshot/public_path/basic/output/input_lazy_be895acc.js b/crates/pack-tests/tests/snapshot/public_path/basic/output/input_lazy_be895acc.js index 0fbd7267c..05379f992 100644 --- a/crates/pack-tests/tests/snapshot/public_path/basic/output/input_lazy_be895acc.js +++ b/crates/pack-tests/tests/snapshot/public_path/basic/output/input_lazy_be895acc.js @@ -1,5 +1,5 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, -73, ((__turbopack_context__) => { +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, +73, (function(__turbopack_context__) { "use strict"; function lazyModule() { diff --git a/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js b/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js index 9b7318b06..3a890e1e9 100644 --- a/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js +++ b/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js @@ -1,17 +1,19 @@ -(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([ +((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] || ((typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))))["TURBOPACK"] = [])).push([ typeof document === "object" ? document.currentScript : undefined, {"otherChunks":["input_2d0fce75.js"],"runtimeModuleIds":[4]} ]); (() => { -if (!Array.isArray(globalThis["TURBOPACK"])) { +var __turbopack_global__ = typeof globalThis !== "undefined" ? globalThis : (typeof self !== "undefined" ? self : (typeof window !== "undefined" ? window : (typeof global !== "undefined" ? global : {}))); +var globalThis = __turbopack_global__; +if (!Array.isArray(__turbopack_global__["TURBOPACK"])) { return; } -const CHUNK_BASE_PATH = "https://cdn.example.com/assets/"; -const RELATIVE_ROOT_PATH = "/ROOT"; -const RUNTIME_PUBLIC_PATH = "https://cdn.example.com/assets/"; -const ASSET_SUFFIX = ""; -const WORKER_FORWARDED_GLOBALS = []; +var CHUNK_BASE_PATH = "https://cdn.example.com/assets/"; +var RELATIVE_ROOT_PATH = "/ROOT"; +var RUNTIME_PUBLIC_PATH = "https://cdn.example.com/assets/"; +var ASSET_SUFFIX = ""; +var WORKER_FORWARDED_GLOBALS = []; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -1117,8 +1119,8 @@ let BACKEND; return fetch(getChunkRelativeUrl(wasmChunkPath)); } })(); -const chunksToRegister = globalThis["TURBOPACK"]; -globalThis["TURBOPACK"] = { push: registerChunk }; +var chunksToRegister = __turbopack_global__["TURBOPACK"] || []; +__turbopack_global__["TURBOPACK"] = { push: registerChunk }; chunksToRegister.forEach(registerChunk); })(); diff --git a/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js.map b/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js.map index 17e0a864f..2aa87fa1f 100644 --- a/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js.map +++ b/crates/pack-tests/tests/snapshot/public_path/basic/output/main.js.map @@ -2,8 +2,8 @@ "version": 3, "sources": [], "sections": [ - {"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n/**\n * Describes why a module was instantiated.\n * Shared between browser and Node.js runtimes.\n */\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\n// @ts-ignore Defined in `hmr-runtime.ts` (dev mode only)\ndeclare let devModuleCache: Record | undefined\n\n/**\n * Flag indicating which module object type to create when a module is merged. Set to `true`\n * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,\n * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it\n * uses plain Module objects.\n */\nlet createModuleWithDirectionFlag = false\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n if (createModuleWithDirectionFlag) {\n // set in development modes for hmr support\n module = createModuleWithDirection(id)\n } else {\n module = createModuleObject(id)\n }\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\nfunction createModuleWithDirection(id: ModuleId): ModuleWithDirection {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n parents: [],\n children: [],\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n\n // Install the factory for each module ID that doesn't already have one.\n // When some IDs in this group already have a factory, reuse that existing\n // group factory for the missing IDs to keep all IDs in the group consistent.\n // Otherwise, install the factory from this chunk.\n const moduleFactoryFn = chunkModules[end] as Function\n let existingGroupFactory: Function | undefined = undefined\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n const existingFactory = moduleFactories.get(id)\n if (existingFactory) {\n existingGroupFactory = existingFactory\n break\n }\n }\n const factoryToInstall = existingGroupFactory ?? moduleFactoryFn\n\n let didInstallFactory = false\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n if (!moduleFactories.has(id)) {\n if (!didInstallFactory) {\n if (factoryToInstall === moduleFactoryFn) {\n applyModuleFactoryName(moduleFactoryFn)\n }\n didInstallFactory = true\n }\n moduleFactories.set(id, factoryToInstall)\n newModuleId?.(id)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * Constructs an error message for when a module factory is not available.\n */\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\n/**\n * Gets the public path for runtime assets.\n * Checks globalThis.publicPath and falls back to empty string.\n */\nfunction getPublicPath(): string {\n if (\n typeof globalThis !== 'undefined' &&\n typeof (globalThis as any).publicPath === 'string'\n ) {\n const publicPath = (globalThis as any).publicPath as string\n return publicPath.endsWith('/') ? publicPath : `${publicPath}/`\n }\n return ''\n}\ncontextPrototype.p = getPublicPath\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["SourceType","createModuleWithDirectionFlag","REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleWithDirection","createModuleObject","error","undefined","namespaceObject","parents","children","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","moduleFactoryFn","existingGroupFactory","existingFactory","factoryToInstall","didInstallFactory","has","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","factoryNotAvailableMessage","sourceType","sourceData","instantiationReason","requireStub","_moduleId","z","g","globalThis","getPublicPath","publicPath","endsWith","p","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAI7C;;;CAGC,GACD,IAAA,AAAKA,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAA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3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\ndeclare var WORKER_FORWARDED_GLOBALS: string[]\n\n// Support runtime public path from window.publicPath\nfunction getRuntimeChunkBasePath(): string {\n if (CHUNK_BASE_PATH === '__RUNTIME_PUBLIC_PATH__') {\n return contextPrototype.p()\n }\n return CHUNK_BASE_PATH\n}\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistrationChunk =\n | ChunkPath\n | { getAttribute: (name: string) => string | null }\n | undefined\n\ntype ChunkRegistration = [\n chunkPath: ChunkRegistrationChunk,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkRegistrationChunk\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\ninterface RuntimeBackend {\n registerChunk: (\n chunkPath: ChunkPath | ChunkScript,\n params?: RuntimeParams\n ) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\nconst loadedScripts = new Map>()\n\n/**\n * Load an external script by creating a