File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,16 @@ export class TnsModulesCopy {
67
67
68
68
const dependenciesFolder = path . join ( targetPackageDir , constants . NODE_MODULES_FOLDER_NAME ) ;
69
69
if ( this . $fs . exists ( dependenciesFolder ) ) {
70
- const dependencies = this . $fs . readDirectory ( dependenciesFolder ) ;
71
- dependencies . filter ( dir => ! ! productionDependencies || ! productionDependencies . hasOwnProperty ( dir ) )
70
+ const dependencies = _ . flatten ( this . $fs . readDirectory ( dependenciesFolder )
71
+ . map ( dir => {
72
+ if ( _ . startsWith ( dir , "@" ) ) {
73
+ return this . $fs . readDirectory ( path . join ( dependenciesFolder , dir ) ) ;
74
+ }
75
+
76
+ return dir ;
77
+ } ) ) ;
78
+
79
+ dependencies . filter ( dir => ! productionDependencies || ! productionDependencies . hasOwnProperty ( dir ) )
72
80
. forEach ( dir => shelljs . rm ( "-rf" , path . join ( dependenciesFolder , dir ) ) ) ;
73
81
}
74
82
}
You can’t perform that action at this time.
0 commit comments