diff --git a/actions/build.action.ts b/actions/build.action.ts index 7553afc0e..796e60712 100644 --- a/actions/build.action.ts +++ b/actions/build.action.ts @@ -124,6 +124,7 @@ export class BuildAction extends AbstractAction { ); return this.webpackCompiler.run( configuration, + options, webpackConfigFactoryOrConfig, pathToTsconfig, appName, diff --git a/lib/compiler/webpack-compiler.ts b/lib/compiler/webpack-compiler.ts index e018b4dc1..c0eee1710 100644 --- a/lib/compiler/webpack-compiler.ts +++ b/lib/compiler/webpack-compiler.ts @@ -6,6 +6,7 @@ import { AssetsManager } from './assets-manager'; import { webpackDefaultsFactory } from './defaults/webpack-defaults'; import { getValueOrDefault } from './helpers/get-value-or-default'; import { PluginsLoader } from './plugins-loader'; +import { Input } from '../../commands'; import webpack = require('webpack'); type WebpackConfigFactory = ( @@ -22,6 +23,7 @@ export class WebpackCompiler { public run( configuration: Required, + options: Input[], webpackConfigFactoryOrConfig: | WebpackConfigFactoryOrConfig | WebpackConfigFactoryOrConfig[], @@ -51,6 +53,8 @@ export class WebpackCompiler { configuration, 'sourceRoot', appName, + 'sourceRoot', + options, ); const pathToSource = normalize(sourceRoot).indexOf(normalize(relativeRootPath)) >= 0 @@ -61,6 +65,8 @@ export class WebpackCompiler { configuration, 'entryFile', appName, + 'entryFile', + options, ); const entryFileRoot = getValueOrDefault(configuration, 'root', appName) || '';