Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 committed Nov 20, 2024
1 parent 6b605d2 commit a8747f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/cli/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export async function build(
options: Pick<BuildOptions, 'root' | 'lib' | 'watch'> = {},
): Promise<RsbuildInstance> {
const cwd = process.cwd();
options.root = options.root ? getAbsolutePath(cwd, options.root) : cwd;
const root = options.root ? getAbsolutePath(cwd, options.root) : cwd;

const environments = await composeRsbuildEnvironments(config, options.root);
const environments = await composeRsbuildEnvironments(config, root);
const rsbuildInstance = await createRsbuild({
rsbuildConfig: {
environments: pruneEnvironments(environments, options.lib),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/cli/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export async function inspect(
> = {},
): Promise<RsbuildInstance> {
const cwd = process.cwd();
options.root = options.root ? getAbsolutePath(cwd, options.root) : cwd;
const root = options.root ? getAbsolutePath(cwd, options.root) : cwd;

const environments = await composeRsbuildEnvironments(config, options.root);
const environments = await composeRsbuildEnvironments(config, root);
const rsbuildInstance = await createRsbuild({
rsbuildConfig: {
environments: pruneEnvironments(environments, options.lib),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/cli/mf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export async function startMFDevServer(
options: Pick<CommonOptions, 'root'> = {},
): Promise<RsbuildInstance | undefined> {
const cwd = process.cwd();
options.root = options.root ? getAbsolutePath(cwd, options.root) : cwd;
const rsbuildInstance = await initMFRsbuild(config, options.root);
const root = options.root ? getAbsolutePath(cwd, options.root) : cwd;
const rsbuildInstance = await initMFRsbuild(config, root);
return rsbuildInstance;
}

Expand Down

0 comments on commit a8747f1

Please sign in to comment.