Skip to content

Commit

Permalink
[wip] strip extra .js from reverseExports
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Oct 24, 2023
1 parent c08523a commit 04733ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/module-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import type UserOptions from './options';

// this is an overly simple example of the function that we need. It needs to become its own package with its own tests
function reversePackageExports(packageJSON: PackageInfo, relativePath: string): string {
return posix.join(packageJSON.name, relativePath.replace(/^.\/dist\//, `./`));
return posix.join(packageJSON.name, relativePath.replace(/^.\/dist\//, `./`).replace(/\.js$/, ''));
}

const debug = makeDebug('embroider:resolver');
Expand Down

0 comments on commit 04733ee

Please sign in to comment.