11cb0ef41Sopenharmony_ciimport { writeSync } from 'node:fs';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciexport async function load(url, context, next) {
41cb0ef41Sopenharmony_ci  // This check is needed to make sure that we don't prevent the
51cb0ef41Sopenharmony_ci  // resolution from follow-up loaders. It wouldn't be a problem
61cb0ef41Sopenharmony_ci  // in real life because loaders aren't supposed to break the
71cb0ef41Sopenharmony_ci  // resolution, but the ones used in our tests do, for convenience.
81cb0ef41Sopenharmony_ci  if (url === 'node:fs' || url.includes('loader')) {
91cb0ef41Sopenharmony_ci    return next(url);
101cb0ef41Sopenharmony_ci  }
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ci  writeSync(1, 'load passthru' + '\n'); // Signal that this specific hook ran
131cb0ef41Sopenharmony_ci  return next(url);
141cb0ef41Sopenharmony_ci}
15