File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed
packages/angular_devkit/build_angular/src
angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,12 @@ const WorkerPlugin = require('worker-plugin');
1515
1616export function getWorkerConfig ( wco : WebpackConfigOptions ) : Configuration {
1717 const { buildOptions } = wco ;
18+
1819 if ( ! buildOptions . webWorkerTsConfig ) {
20+ return { } ;
21+ }
22+
23+ if ( typeof buildOptions . webWorkerTsConfig != 'string' ) {
1924 throw new Error ( 'The `webWorkerTsConfig` must be a string.' ) ;
2025 }
2126
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ export function buildWebpackConfig(
155155 getBrowserConfig ( wco ) ,
156156 getStylesConfig ( wco ) ,
157157 getStatsConfig ( wco ) ,
158+ getWorkerConfig ( wco ) ,
158159 ] ;
159160
160161 if ( wco . buildOptions . main || wco . buildOptions . polyfills ) {
@@ -179,10 +180,6 @@ export function buildWebpackConfig(
179180 } ) ;
180181 }
181182
182- if ( wco . buildOptions . webWorkerTsConfig ) {
183- webpackConfigs . push ( getWorkerConfig ( wco ) ) ;
184- }
185-
186183 const webpackConfig = webpackMerge ( webpackConfigs ) ;
187184
188185 if ( options . profile || process . env [ 'NG_BUILD_PROFILING' ] ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515 getNonAotConfig ,
1616 getStylesConfig ,
1717 getTestConfig ,
18+ getWorkerConfig ,
1819} from '../angular-cli-files/models/webpack-configs' ;
1920import { Schema as BrowserBuilderOptions } from '../browser/schema' ;
2021import { generateBrowserWebpackConfigFromContext } from '../utils/webpack-browser-config' ;
@@ -44,6 +45,7 @@ async function initialize(
4445 getStylesConfig ( wco ) ,
4546 getNonAotConfig ( wco ) ,
4647 getTestConfig ( wco ) ,
48+ getWorkerConfig ( wco ) ,
4749 ] ,
4850 ) ;
4951
Original file line number Diff line number Diff line change 185185 "items" : {
186186 "type" : " string"
187187 }
188+ },
189+ "webWorkerTsConfig" : {
190+ "type" : " string" ,
191+ "description" : " TypeScript configuration for Web Worker modules."
188192 }
189193 },
190194 "additionalProperties" : false ,
You can’t perform that action at this time.
0 commit comments