async function _loader(source, inputSourceMap) {
    /** @type {'esm' | 'cjs'} */
    const moduleSystem = await getModuleSystem.call(this, ModuleFilenameHelpers, options);

    const RefreshSetupRuntime = RefreshSetupRuntimes[moduleSystem];
    const RefreshModuleRuntime = getRefreshModuleRuntime(Template, {
      const: options.const,
      moduleSystem,
    });

    if (this.sourceMap) {
      let originalSourceMap = inputSourceMap;
      if (!originalSourceMap) {
        originalSourceMap = getIdentitySourceMap(source, this.resourcePath);
      }

      return SourceMapConsumer.with(originalSourceMap, undefined, (consumer) => {
        const node = SourceNode.fromStringWithSourceMap(source, consumer);

        node.prepend([RefreshSetupRuntime, '\n\n']);
        node.add(['\n\n', RefreshModuleRuntime]);

        const { code, map } = node.toStringWithSourceMap();
        return [code, map.toJSON()];
      });
    } else {
      return [[RefreshSetupRuntime, source, RefreshModuleRuntime].join('\n\n'), inputSourceMap];
    }
  }
@this {import('webpack').LoaderContext<import('./types').ReactRefreshLoaderOptions>}
@param {string} source
@param {import('source-map').RawSourceMap} [inputSourceMap]
@returns {Promise<[string, import('source-map').RawSourceMap]>}