diff --git a/packages/webpack/host/resolver.ts b/packages/webpack/host/resolver.ts index 0b4067539..c861a3ec1 100644 --- a/packages/webpack/host/resolver.ts +++ b/packages/webpack/host/resolver.ts @@ -7,18 +7,6 @@ export function getResolver(platforms: string[], explicitResolve?: string[], nsP platformSpecificExt = platformSpecificExt || ['.ts', '.js', '.scss', '.less', '.css', '.html', '.xml', '.vue', '.json']; return function (path: string) { - const nmIndex = path.lastIndexOf('node_modules'); - - if (nmIndex !== -1) { - const subPath = path.substr(nmIndex + 'node_modules'.length).replace(/\\/g, '/'); - const shouldResolve = explicitResolve.length && explicitResolve.some((packageName) => subPath.indexOf(packageName) !== -1); - const pathParts = subPath.split(/[/\-_]/); - - if (!shouldResolve && pathParts.every((p) => nsPackageFilters.every((f) => f !== p))) { - return path; - } - } - const { dir, name, ext } = parse(path); if (platformSpecificExt.indexOf(ext) === -1) {