@@ -75,6 +75,15 @@ class JsonWebpackSerializer {
7575 }
7676 }
7777
78+ private _globCopyWebpackPluginSerialize ( value : any ) : any {
79+ let patterns = value . options . patterns ;
80+ let globOptions = value . options . globOptions ;
81+ return {
82+ patterns,
83+ globOptions : this . _globReplacer ( globOptions )
84+ } ;
85+ }
86+
7887 private _commonsChunkPluginSerialize ( value : any ) : any {
7988 let minChunks = value . minChunks ;
8089 switch ( typeof minChunks ) {
@@ -165,11 +174,13 @@ class JsonWebpackSerializer {
165174 this . _addImport ( 'webpack.optimize' , 'UglifyJsPlugin' ) ;
166175 break ;
167176 case angularCliPlugins . BaseHrefWebpackPlugin :
168- case angularCliPlugins . GlobCopyWebpackPlugin :
169177 case angularCliPlugins . SuppressExtractedTextChunksWebpackPlugin :
170178 this . _addImport ( '@angular/cli/plugins/webpack' , plugin . constructor . name ) ;
171179 break ;
172-
180+ case angularCliPlugins . GlobCopyWebpackPlugin :
181+ args = this . _globCopyWebpackPluginSerialize ( plugin ) ;
182+ this . _addImport ( '@angular/cli/plugins/webpack' , 'GlobCopyWebpackPlugin' ) ;
183+ break ;
173184 case webpack . optimize . CommonsChunkPlugin :
174185 args = this . _commonsChunkPluginSerialize ( plugin ) ;
175186 this . _addImport ( 'webpack.optimize' , 'CommonsChunkPlugin' ) ;
@@ -321,6 +332,12 @@ class JsonWebpackSerializer {
321332 } ) ;
322333 }
323334
335+ private _globReplacer ( value : any ) {
336+ return Object . assign ( { } , value , {
337+ cwd : this . _relativePath ( 'process.cwd()' , path . relative ( this . _root , value . cwd ) )
338+ } ) ;
339+ }
340+
324341 private _replacer ( _key : string , value : any ) {
325342 if ( value === undefined ) {
326343 return value ;
0 commit comments