@@ -21,6 +21,7 @@ const angularCliPlugins = require('../plugins/webpack');
21
21
const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
22
22
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
23
23
const SilentError = require ( 'silent-error' ) ;
24
+ const licensePlugin = require ( 'license-webpack-plugin' ) ;
24
25
const Task = require ( '../ember-cli/lib/models/task' ) ;
25
26
26
27
const ProgressPlugin = require ( 'webpack/lib/ProgressPlugin' ) ;
@@ -134,6 +135,12 @@ class JsonWebpackSerializer {
134
135
return plugin . defaultValues ;
135
136
}
136
137
138
+ private _licenseWebpackPlugin ( plugin : any ) {
139
+ return {
140
+ 'pattern' : plugin . pattern
141
+ } ;
142
+ }
143
+
137
144
private _pluginsReplacer ( plugins : any [ ] ) {
138
145
return plugins . map ( plugin => {
139
146
let args = plugin . options || undefined ;
@@ -180,13 +187,14 @@ class JsonWebpackSerializer {
180
187
args = this . _environmentPlugin ( plugin ) ;
181
188
this . _addImport ( 'webpack' , 'EnvironmentPlugin' ) ;
182
189
break ;
183
-
190
+ case licensePlugin :
191
+ args = this . _licenseWebpackPlugin ( plugin ) ;
192
+ this . variableImports [ 'license-webpack-plugin' ] = 'licensePlugin' ;
184
193
default :
185
194
if ( plugin . constructor . name == 'AngularServiceWorkerPlugin' ) {
186
195
this . _addImport ( '@angular/service-worker/build/webpack' , plugin . constructor . name ) ;
187
196
}
188
197
break ;
189
-
190
198
}
191
199
192
200
const argsSerialized = JSON . stringify ( args , ( k , v ) => this . _replacer ( k , v ) , 2 ) || '' ;
0 commit comments