From 04733eefb6e713850f95a99dda1f0148c5ce964b Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Mon, 23 Oct 2023 17:40:23 +0100 Subject: [PATCH] [wip] strip extra .js from reverseExports --- packages/core/src/module-resolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/module-resolver.ts b/packages/core/src/module-resolver.ts index 3106a1ecfd..bb26b5206d 100644 --- a/packages/core/src/module-resolver.ts +++ b/packages/core/src/module-resolver.ts @@ -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');