@@ -49,17 +49,16 @@ function _pluginOptionsOverrides(
4949
5050function _createAotPlugin (
5151 wco : WebpackConfigOptions ,
52- options : any ,
53- useMain = true ,
54- extract = false ,
52+ options : AngularCompilerPluginOptions ,
53+ i18nExtract = false ,
5554) {
5655 const { root, buildOptions } = wco ;
5756
5857 const i18nInFile = buildOptions . i18nFile
5958 ? path . resolve ( root , buildOptions . i18nFile )
6059 : undefined ;
6160
62- const i18nFileAndFormat = extract
61+ const i18nFileAndFormat = i18nExtract
6362 ? {
6463 i18nOutFile : buildOptions . i18nFile ,
6564 i18nOutFormat : buildOptions . i18nFormat ,
@@ -79,7 +78,7 @@ function _createAotPlugin(
7978 }
8079
8180 let pluginOptions : AngularCompilerPluginOptions = {
82- mainPath : useMain ? path . join ( root , buildOptions . main ) : undefined ,
81+ mainPath : path . join ( root , buildOptions . main ) ,
8382 ...i18nFileAndFormat ,
8483 locale : buildOptions . i18nLocale ,
8584 platform : buildOptions . platform === 'server' ? PLATFORM . Server : PLATFORM . Browser ,
@@ -108,7 +107,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions) {
108107 } ;
109108}
110109
111- export function getAotConfig ( wco : WebpackConfigOptions , extract = false ) {
110+ export function getAotConfig ( wco : WebpackConfigOptions , i18nExtract = false ) {
112111 const { tsConfigPath, buildOptions } = wco ;
113112
114113 const loaders : any [ ] = [ NgToolsLoader ] ;
@@ -123,7 +122,7 @@ export function getAotConfig(wco: WebpackConfigOptions, extract = false) {
123122
124123 return {
125124 module : { rules : [ { test, use : loaders } ] } ,
126- plugins : [ _createAotPlugin ( wco , { tsConfigPath } , true , extract ) ]
125+ plugins : [ _createAotPlugin ( wco , { tsConfigPath } , i18nExtract ) ]
127126 } ;
128127}
129128
0 commit comments