Skip to content

Commit

Permalink
remove incorrect rewrite
Browse files Browse the repository at this point in the history
This was originally intended to work the opposite way (the meaning of the original and relocated packages were reversed) and it was needed because of the way fallback used to work. It's only breaking things now and should be safe to remove.
  • Loading branch information
ef4 committed Feb 1, 2023
1 parent d5a976a commit 4f4f811
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/core/src/module-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@ export class Resolver {
return specifier.replace(packageName, pkg.root);
}

let originalPkg = this.originalPackage(fromFile);
if (originalPkg && pkg.meta['auto-upgraded'] && originalPkg.name === packageName) {
// a file that was relocated into a package does a self-import of that
// package's name. This can happen when an addon (like ember-cli-mirage)
// emits files from its own treeForApp that contain imports of the app's own
// fully qualified name.
return specifier.replace(packageName, originalPkg.root);
}

return specifier;
}

Expand Down

0 comments on commit 4f4f811

Please sign in to comment.