Skip to content

Commit

Permalink
fix: rsbuild breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Aug 10, 2024
1 parent 3ca13db commit 4a48baa
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 54 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"pnpm": {
"overrides": {
"@rspack/core": "npm:@rspack/[email protected]fca07da-20240704070545"
"@rspack/core": "npm:@rspack/[email protected]af0452f-20240808052639"
}
}
}
1 change: 0 additions & 1 deletion packages/core/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export async function build(
const rsbuildInstance = await initRsbuild(config);

await rsbuildInstance.build({
mode: 'production',
watch: options?.watch,
});

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type BuildOptions = CommonOptions & {
};

export type InspectOptions = CommonOptions & {
env: RsbuildMode;
mode: RsbuildMode;
output: string;
verbose?: boolean;
};
Expand Down Expand Up @@ -64,7 +64,7 @@ export function runCli(): void {
const rslibConfig = await loadConfig(options.config, options.envMode);
const rsbuildInstance = await initRsbuild(rslibConfig);
await rsbuildInstance.inspectConfig({
env: options.env,
mode: options.mode,
verbose: options.verbose,
outputPath: options.output,
writeToDisk: true,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export const composeAutoExternalConfig = (options: {

export async function createInternalRsbuildConfig(): Promise<RsbuildConfig> {
return defineRsbuildConfig({
mode: 'production',
dev: {
progressBar: false,
},
Expand Down
3 changes: 3 additions & 0 deletions packages/core/tests/__snapshots__/config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1
"dev": {
"progressBar": false,
},
"mode": "none",
"output": {
"distPath": {
"js": "./",
Expand Down Expand Up @@ -81,6 +82,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1
"dev": {
"progressBar": false,
},
"mode": "none",
"output": {
"distPath": {
"js": "./",
Expand Down Expand Up @@ -153,6 +155,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1
"dev": {
"progressBar": false,
},
"mode": "none",
"output": {
"distPath": {
"js": "./",
Expand Down
100 changes: 50 additions & 50 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a48baa

Please sign in to comment.