resolvesToSameResource = (initialSource, adjustedSource, exportsDir, outputDir) => {
  try {
    const require = createRequire(import.meta.url);
    const initialResolvedPath = require.resolve(initialSource, { paths: [exportsDir] });
    const adjustedResolvedPath = require.resolve(adjustedSource, { paths: [outputDir] });
    return initialResolvedPath === adjustedResolvedPath;
  } catch (error) {
    throw new Error(ERROR_CAN_NOT_RESOLVE_SOURCE);
  }
}
Checks if initialSource and adjustedSource point to resolvable resources,
and if they are pointing to the same resource

@param {string} initialSource Example: `import sth from initialSource;`
@param {string} adjustedSource Example: `import sth from adjustedSource;`
@param {string} exportsDir
@param {string} outputDir
@returns {boolean}
@throws ERROR_CAN_NOT_RESOLVE_SOURCE