Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
fix: Module index is incorrect. close #47
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Feb 11, 2020
1 parent ed2b7a4 commit d69e90a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions typescript-deno-plugin/src/module_resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ export class ModuleResolver {
// resolve `http/server.ts` -> `https://deno.land/std/http/server.ts`
moduleName = this.resolveModuleNameFromImportMaps(moduleName);

// cover `https://example.com/mod.ts` -> `$DENO_DIR/deps/https/example.com/mod.ts`
moduleName = this.convertRemoteToLocalCache(moduleName);

// if module is ESM. Then the module name may contain url query and url hash
// We need to remove it
moduleName = trimQueryAndHashFromPath(moduleName);
Expand All @@ -66,7 +63,10 @@ export class ModuleResolver {
// import "/npm:[email protected]/cjs/react.development.dew.js";
// import "/npm:object-assign@4?dew";
// import "/npm:prop-types@15/checkPropTypes?dew";
moduleName = resolvedModule.filepath = this.resolveFromDenoDir(
moduleName = this.resolveFromDenoDir(moduleName);

// cover `https://example.com/mod.ts` -> `$DENO_DIR/deps/https/example.com/mod.ts`
moduleName = resolvedModule.filepath = this.convertRemoteToLocalCache(
moduleName
);

Expand Down
2 changes: 0 additions & 2 deletions typescript-deno-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ export class DenoPlugin implements ts_module.server.PluginModule {
);
}

this.logger.info(`workspace dir ${info.project.getCurrentDirectory()}`);

const resolver = new ModuleResolver(
containingFile,
this.logger,
Expand Down

0 comments on commit d69e90a

Please sign in to comment.