@@ -21,6 +21,7 @@ const angularCliPlugins = require('../plugins/webpack');
2121const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
2222const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
2323const SilentError = require ( 'silent-error' ) ;
24+ const licensePlugin = require ( 'license-webpack-plugin' ) ;
2425const Task = require ( '../ember-cli/lib/models/task' ) ;
2526
2627const ProgressPlugin = require ( 'webpack/lib/ProgressPlugin' ) ;
@@ -134,6 +135,12 @@ class JsonWebpackSerializer {
134135 return plugin . defaultValues ;
135136 }
136137
138+ private _licenseWebpackPlugin ( plugin : any ) {
139+ return {
140+ 'pattern' : plugin . pattern
141+ } ;
142+ }
143+
137144 private _pluginsReplacer ( plugins : any [ ] ) {
138145 return plugins . map ( plugin => {
139146 let args = plugin . options || undefined ;
@@ -180,13 +187,14 @@ class JsonWebpackSerializer {
180187 args = this . _environmentPlugin ( plugin ) ;
181188 this . _addImport ( 'webpack' , 'EnvironmentPlugin' ) ;
182189 break ;
183-
190+ case licensePlugin :
191+ args = this . _licenseWebpackPlugin ( plugin ) ;
192+ this . variableImports [ 'license-webpack-plugin' ] = 'licensePlugin' ;
184193 default :
185194 if ( plugin . constructor . name == 'AngularServiceWorkerPlugin' ) {
186195 this . _addImport ( '@angular/service-worker/build/webpack' , plugin . constructor . name ) ;
187196 }
188197 break ;
189-
190198 }
191199
192200 const argsSerialized = JSON . stringify ( args , ( k , v ) => this . _replacer ( k , v ) , 2 ) || '' ;
0 commit comments