mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(webpack): Angular no longer has issues handling {N} plugins without nativescript in name (#9172)
This commit is contained in:
committed by
GitHub
parent
a26b807652
commit
79a5fc8975
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user