Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Fix core preset default value #20646

Merged
merged 1 commit into from
Jan 18, 2023
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: 1 addition & 4 deletions code/lib/core-server/src/build-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export async function buildDevStandalone(
...options,
});

const { renderer, builder, disableTelemetry } = await presets.apply<CoreConfig>(
'core',
undefined
);
const { renderer, builder, disableTelemetry } = await presets.apply<CoreConfig>('core', {});

if (!options.disableTelemetry && !disableTelemetry) {
if (versionCheck.success && !versionCheck.cached) {
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-server/src/build-static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function buildStaticStandalone(
});

const [previewBuilder, managerBuilder] = await getBuilders({ ...options, presets });
const { renderer } = await presets.apply<CoreConfig>('core', undefined);
const { renderer } = await presets.apply<CoreConfig>('core', {});

presets = await loadAllPresets({
corePresets: [
Expand Down
4 changes: 2 additions & 2 deletions code/lib/core-server/src/utils/get-builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export async function getPreviewBuilder(
}

export async function getBuilders({ presets, configDir }: Options): Promise<Builder<unknown>[]> {
const core = await presets.apply<CoreConfig>('core', undefined);
const builderName = typeof core?.builder === 'string' ? core.builder : core?.builder?.name;
const { builder } = await presets.apply<CoreConfig>('core', {});
const builderName = typeof builder === 'string' ? builder : builder?.name;

return Promise.all([getPreviewBuilder(builderName, configDir), getManagerBuilder()]);
}