Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/compiler/helpers/get-rspack-config-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getValueOrDefault } from './get-value-or-default.js';

/**
* Returns the path to the rspack configuration file to use for the given application.
* CLI option `rspackPath` takes precedence over the configuration file.
* @param configuration Configuration object.
* @param cmdOptions Command line options.
* @param appName Application name.
Expand All @@ -13,6 +14,10 @@ export function getRspackConfigPath(
cmdOptions: Record<string, any>,
appName: string | undefined,
) {
if (cmdOptions?.rspackPath) {
return cmdOptions.rspackPath as string;
}

const builder = getValueOrDefault<Builder>(
configuration,
'compilerOptions.builder',
Expand Down
Loading