Skip to content

Commit

Permalink
fix: load the entry file supplied via command-line option
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Apr 22, 2023
1 parent 8b63cde commit 24bb37b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions actions/build.action.ts
Expand Up @@ -124,6 +124,7 @@ export class BuildAction extends AbstractAction {
);
return this.webpackCompiler.run(
configuration,
options,
webpackConfigFactoryOrConfig,
pathToTsconfig,
appName,
Expand Down
6 changes: 6 additions & 0 deletions lib/compiler/webpack-compiler.ts
Expand Up @@ -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 = (
Expand All @@ -22,6 +23,7 @@ export class WebpackCompiler {

public run(
configuration: Required<Configuration>,
options: Input[],
webpackConfigFactoryOrConfig:
| WebpackConfigFactoryOrConfig
| WebpackConfigFactoryOrConfig[],
Expand Down Expand Up @@ -51,6 +53,8 @@ export class WebpackCompiler {
configuration,
'sourceRoot',
appName,
'sourceRoot',
options,
);
const pathToSource =
normalize(sourceRoot).indexOf(normalize(relativeRootPath)) >= 0
Expand All @@ -61,6 +65,8 @@ export class WebpackCompiler {
configuration,
'entryFile',
appName,
'entryFile',
options,
);
const entryFileRoot =
getValueOrDefault<string>(configuration, 'root', appName) || '';
Expand Down

0 comments on commit 24bb37b

Please sign in to comment.