Skip to content

Commit

Permalink
fix(webpack): Angular no longer has issues handling {N} plugins witho…
Browse files Browse the repository at this point in the history
…ut nativescript in name (#9172)
  • Loading branch information
Nathanael Anderson committed Jan 26, 2021
1 parent a26b807 commit 79a5fc8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/webpack/host/resolver.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 79a5fc8

Please sign in to comment.