@@ -53,60 +53,45 @@ impl<'l> From<&'l TurbopackRuntimeFunctionShortcut> for &'l str {
5353 }
5454}
5555
56- pub const TURBOPACK_EXPORTS : & TurbopackRuntimeFunctionShortcut =
57- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.e" , "e" ) ;
58- pub const TURBOPACK_MODULE : & TurbopackRuntimeFunctionShortcut =
59- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.m" , "m" ) ;
60- pub const TURBOPACK_REQUIRE : & TurbopackRuntimeFunctionShortcut =
61- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.r" , "r" ) ;
62- pub const TURBOPACK_ASYNC_LOADER : & TurbopackRuntimeFunctionShortcut =
63- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.A" , "A" ) ;
64- pub const TURBOPACK_MODULE_CONTEXT : & TurbopackRuntimeFunctionShortcut =
65- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.f" , "f" ) ;
66- pub const TURBOPACK_IMPORT : & TurbopackRuntimeFunctionShortcut =
67- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.i" , "i" ) ;
68- pub const TURBOPACK_ESM : & TurbopackRuntimeFunctionShortcut =
69- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.s" , "s" ) ;
70- pub const TURBOPACK_EXPORT_VALUE : & TurbopackRuntimeFunctionShortcut =
71- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.v" , "v" ) ;
72- pub const TURBOPACK_EXPORT_NAMESPACE : & TurbopackRuntimeFunctionShortcut =
73- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.n" , "n" ) ;
74- pub const TURBOPACK_CACHE : & TurbopackRuntimeFunctionShortcut =
75- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.c" , "c" ) ;
76- pub const TURBOPACK_MODULES : & TurbopackRuntimeFunctionShortcut =
77- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.M" , "M" ) ;
78- pub const TURBOPACK_LOAD : & TurbopackRuntimeFunctionShortcut =
79- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.l" , "l" ) ;
80- pub const TURBOPACK_LOAD_BY_URL : & TurbopackRuntimeFunctionShortcut =
81- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.L" , "L" ) ;
82- pub const TURBOPACK_CLEAR_CHUNK_CACHE : & TurbopackRuntimeFunctionShortcut =
83- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.C" , "C" ) ;
84- pub const TURBOPACK_DYNAMIC : & TurbopackRuntimeFunctionShortcut =
85- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.j" , "j" ) ;
86- pub const TURBOPACK_RESOLVE_ABSOLUTE_PATH : & TurbopackRuntimeFunctionShortcut =
87- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.P" , "P" ) ;
88- pub const TURBOPACK_RELATIVE_URL : & TurbopackRuntimeFunctionShortcut =
89- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.U" , "U" ) ;
90- pub const TURBOPACK_RESOLVE_MODULE_ID_PATH : & TurbopackRuntimeFunctionShortcut =
91- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.R" , "R" ) ;
92- pub const TURBOPACK_WORKER_BLOB_URL : & TurbopackRuntimeFunctionShortcut =
93- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.b" , "b" ) ;
94- pub const TURBOPACK_ASYNC_MODULE : & TurbopackRuntimeFunctionShortcut =
95- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.a" , "a" ) ;
96- pub const TURBOPACK_EXTERNAL_REQUIRE : & TurbopackRuntimeFunctionShortcut =
97- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.x" , "x" ) ;
98- pub const TURBOPACK_EXTERNAL_IMPORT : & TurbopackRuntimeFunctionShortcut =
99- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.y" , "y" ) ;
100- pub const TURBOPACK_REFRESH : & TurbopackRuntimeFunctionShortcut =
101- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.k" , "k" ) ;
102- pub const TURBOPACK_REQUIRE_STUB : & TurbopackRuntimeFunctionShortcut =
103- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.z" , "z" ) ;
104- pub const TURBOPACK_REQUIRE_REAL : & TurbopackRuntimeFunctionShortcut =
105- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.t" , "t" ) ;
106- pub const TURBOPACK_WASM : & TurbopackRuntimeFunctionShortcut =
107- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.w" , "w" ) ;
108- pub const TURBOPACK_WASM_MODULE : & TurbopackRuntimeFunctionShortcut =
109- & TurbopackRuntimeFunctionShortcut :: new ( "__turbopack_context__.u" , "u" ) ;
56+ macro_rules! make_shortcut {
57+ ( $shortcut: expr) => {
58+ const {
59+ & TurbopackRuntimeFunctionShortcut :: new(
60+ concat!( "__turbopack_context__." , $shortcut) ,
61+ $shortcut,
62+ )
63+ }
64+ } ;
65+ }
66+
67+ pub const TURBOPACK_EXPORTS : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "e" ) ;
68+ pub const TURBOPACK_MODULE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "m" ) ;
69+ pub const TURBOPACK_REQUIRE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "r" ) ;
70+ pub const TURBOPACK_ASYNC_LOADER : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "A" ) ;
71+ pub const TURBOPACK_MODULE_CONTEXT : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "f" ) ;
72+ pub const TURBOPACK_IMPORT : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "i" ) ;
73+ pub const TURBOPACK_ESM : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "s" ) ;
74+ pub const TURBOPACK_EXPORT_VALUE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "v" ) ;
75+ pub const TURBOPACK_EXPORT_NAMESPACE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "n" ) ;
76+ pub const TURBOPACK_CACHE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "c" ) ;
77+ pub const TURBOPACK_MODULES : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "M" ) ;
78+ pub const TURBOPACK_LOAD : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "l" ) ;
79+ pub const TURBOPACK_LOAD_BY_URL : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "L" ) ;
80+ pub const TURBOPACK_CLEAR_CHUNK_CACHE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "C" ) ;
81+ pub const TURBOPACK_DYNAMIC : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "j" ) ;
82+ pub const TURBOPACK_RESOLVE_ABSOLUTE_PATH : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "P" ) ;
83+ pub const TURBOPACK_RELATIVE_URL : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "U" ) ;
84+ pub const TURBOPACK_RESOLVE_MODULE_ID_PATH : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "R" ) ;
85+ pub const TURBOPACK_WORKER_BLOB_URL : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "b" ) ;
86+ pub const TURBOPACK_ASYNC_MODULE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "a" ) ;
87+ pub const TURBOPACK_EXTERNAL_REQUIRE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "x" ) ;
88+ pub const TURBOPACK_EXTERNAL_IMPORT : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "y" ) ;
89+ pub const TURBOPACK_REFRESH : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "k" ) ;
90+ pub const TURBOPACK_REQUIRE_STUB : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "z" ) ;
91+ pub const TURBOPACK_REQUIRE_REAL : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "t" ) ;
92+ pub const TURBOPACK_WASM : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "w" ) ;
93+ pub const TURBOPACK_WASM_MODULE : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "u" ) ;
94+ pub const TURBOPACK_GLOBAL : & TurbopackRuntimeFunctionShortcut = make_shortcut ! ( "g" ) ;
11095
11196/// Adding an entry to this list will automatically ensure that `__turbopack_XXX__` can be called
11297/// from user code (by inserting a replacement into free_var_references)
0 commit comments