Skip to content

Commit

Permalink
fix: fix windows node resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 13, 2020
1 parent 02753b7 commit 4f2953e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/server/serverPluginModuleResolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function resolveNodeModule(root: string, id: string): string | undefined {
if (pkgPath) {
// if yes, this is a entry import. resolve entry file
const pkg = require(pkgPath)
const entryPoint = path.join(id, '/', pkg.module || pkg.main || 'index.js')
const entryPoint = id + '/' + (pkg.module || pkg.main || 'index.js')
debug(`(node_module entry) ${id} -> ${entryPoint}`)
nodeModulesMap.set(id, entryPoint)
return entryPoint
Expand Down

0 comments on commit 4f2953e

Please sign in to comment.