Skip to content

Commit

Permalink
Next.js: Make RSC portable-stories compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Jul 30, 2024
1 parent 61b8fc3 commit b7d9207
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/renderers/react/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ export const previewAnnotations: PresetProperty<'previewAnnotations'> = async (
options
) => {
const docsConfig = await options.presets.apply('docs', {}, options);
const features = await options.presets.apply('features', {}, options);
const docsEnabled = Object.keys(docsConfig).length > 0;
const result: string[] = [];

return result
.concat(input)
.concat([join(__dirname, 'entry-preview.mjs')])
.concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.mjs')] : [])
.concat(FEATURES?.experimentalRSC ? [join(__dirname, 'entry-preview-rsc.mjs')] : []);
.concat(features?.experimentalRSC ? [join(__dirname, 'entry-preview-rsc.mjs')] : []);
};

/**
Expand Down

0 comments on commit b7d9207

Please sign in to comment.