getAdjustImportExportVisitor = (exportsDir, outputDir) => ({
  // @ts-ignore
  enter({ node }) {
    const isImportOrExportNode = isImportDeclaration(node) || isExportDeclaration(node);
    if (!isImportOrExportNode) {
      return;
    }
    // @ts-ignore
    const { source } = node;
    const initialSource = source?.value;
    if (!initialSource) {
      return;
    }
    const isRelativeSource = initialSource?.startsWith('.');
    if (!isRelativeSource) {
      return;
    }
    const adjustedSource = adjustSource(initialSource, exportsDir, outputDir);
    if (!resolvesToSameResource(initialSource, adjustedSource, exportsDir, outputDir)) {
      throw new Error(ERROR_ADJUSTED_SOURCE_IS_INVALID);
    }
    // register the new source value
    source.value = adjustedSource;
  },
})
Adjusts the source value of an import/export declaration.
  Example: `import sth from source;`
The new source value is calculated relative to the outputDir.
And checked to be resolvable to the same resource with Node.js require.resolve

https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md#visitors
@param {string} exportsDir
@param {string} outputDir
@throws ERROR_ADJUSTED_SOURCE_IS_INVALID