From 79a5fc89750ea467a2d44d5d9b5264c9fdad1a94 Mon Sep 17 00:00:00 2001 From: Nathanael Anderson Date: Tue, 26 Jan 2021 11:28:10 -0600 Subject: [PATCH] fix(webpack): Angular no longer has issues handling {N} plugins without nativescript in name (#9172) --- packages/webpack/host/resolver.ts | 12 ------------ 1 file changed, 12 deletions(-) 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) {