@@ -32,6 +32,7 @@ BuiltinLoader BuiltinLoader::instance_;
3232
3333BuiltinLoader::BuiltinLoader () : config_(GetConfig()), has_code_cache_(false ) {
3434 LoadJavaScriptSource ();
35+ #if defined(NODE_HAVE_I18N_SUPPORT)
3536#ifdef NODE_SHARED_BUILTIN_CJS_MODULE_LEXER_LEXER_PATH
3637 AddExternalizedBuiltin (
3738 " internal/deps/cjs-module-lexer/lexer" ,
@@ -51,6 +52,7 @@ BuiltinLoader::BuiltinLoader() : config_(GetConfig()), has_code_cache_(false) {
5152 " undici/undici" ,
5253 STRINGIFY (NODE_SHARED_BUILTIN_CJS_MODULE_LEXER_DIST_LEXER_PATH));
5354#endif // NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH
55+ #endif // NODE_HAVE_I18N_SUPPORT
5456}
5557
5658BuiltinLoader* BuiltinLoader::GetInstance () {
@@ -237,6 +239,7 @@ MaybeLocal<String> BuiltinLoader::LoadBuiltinSource(Isolate* isolate,
237239#endif // NODE_BUILTIN_MODULES_PATH
238240}
239241
242+ #if defined(NODE_HAVE_I18N_SUPPORT)
240243void BuiltinLoader::AddExternalizedBuiltin (const char * id,
241244 const char * filename) {
242245 std::string source;
@@ -259,6 +262,7 @@ void BuiltinLoader::AddExternalizedBuiltin(const char* id,
259262 // keep source bytes for builtin alive while BuiltinLoader exists
260263 GetInstance ()->externalized_source_bytes_ .push_back (std::move (source_utf16));
261264}
265+ #endif // NODE_HAVE_I18N_SUPPORT
262266
263267// Returns Local<Function> of the compiled module if return_code_cache
264268// is false (we are only compiling the function).
0 commit comments