File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,16 @@ export class TnsModulesCopy {
6767
6868 const dependenciesFolder = path . join ( targetPackageDir , constants . NODE_MODULES_FOLDER_NAME ) ;
6969 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 ) )
7280 . forEach ( dir => shelljs . rm ( "-rf" , path . join ( dependenciesFolder , dir ) ) ) ;
7381 }
7482 }
You can’t perform that action at this time.
0 commit comments