We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0a5fa6 commit dbe8ac2Copy full SHA for dbe8ac2
src/module-server/node-resolve.ts
@@ -129,7 +129,7 @@ export const resolveFromNodeModules = async (
129
const cacheKey = resolveCacheKey(id, importer, root);
130
const cached = resolveCache.get(cacheKey);
131
if (cached) return cached;
132
- const pathChunks = id.split(/[\/]/g);
+ const pathChunks = id.split(/[\\/]/g);
133
const isNpmNamespace = id[0] === '@';
134
// If it is an npm namespace, then get the first two folders, otherwise just one
135
const packageName = pathChunks.slice(0, isNpmNamespace ? 2 : 1);
0 commit comments