Skip to content

Commit

Permalink
feat: allow to configure progress bar by environment (#2730)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Jun 29, 2024
1 parent 50d455e commit 46267fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/plugins/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const pluginProgress = (): RsbuildPlugin => ({
}

api.modifyBundlerChain(async (chain, { CHAIN_ID, environment }) => {
const config = api.getNormalizedConfig();
const { config } = environment;
const options =
config.dev.progressBar ??
// enable progress bar in production by default
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/types/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface EnvironmentConfig {
/**
* Options for local development.
*/
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation'>;
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation' | 'progressBar'>;
/**
* Options for HTML generation.
*/
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface EnvironmentConfig {
/**
* Options for local development.
*/
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation'>;
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation' | 'progressBar'>;
/**
* Options for HTML generation.
*/
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/config/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface EnvironmentConfig {
/**
* Options for local development.
*/
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation'>;
dev?: Pick<DevConfig, 'assetPrefix' | 'lazyCompilation' | 'progressBar'>;
/**
* Options for HTML generation.
*/
Expand Down

0 comments on commit 46267fd

Please sign in to comment.