Skip to content

Commit

Permalink
Revert "fix(dynamicInstantiate): works with pnpm (#45)"
Browse files Browse the repository at this point in the history
This reverts commit 9c3e8c9.
  • Loading branch information
EntraptaJ committed May 12, 2020
1 parent a461c3b commit 4a92673
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export async function resolve(
export async function dynamicInstantiate(url: string) {
const moduleUrl = new URL(url);

const pathParts = moduleUrl.pathname.split('node_modules/');
const specifier = pathParts.pop()!;
const nodeModulesBase = pathParts.join('node_modules/');
const [nodeModulesBase, specifier] = moduleUrl.pathname.split(
'node_modules/',
);

const nodeModuleUrl = new URL('node_modules', pathToFileURL(nodeModulesBase));

Expand Down

0 comments on commit 4a92673

Please sign in to comment.