Skip to content

Commit

Permalink
Merge pull request #20256 from storybookjs/20254-fix-csf-plugin-unexp…
Browse files Browse the repository at this point in the history
…ected-storiesof

Csf-plugin: Fix spurious storiesOf warnings
  • Loading branch information
shilman authored Dec 14, 2022
2 parents 970ebea + bb46d57 commit fa5051f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/lib/csf-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export const unplugin = createUnplugin<CsfPluginOptions>((options) => {
enrichCsf(csf, options);
return formatCsf(csf);
} catch (err: any) {
logger.warn(err.message);
// This can be called on legacy storiesOf files, so just ignore
// those errors. But warn about other errors.
if (!err.message?.startsWith('CSF:')) {
logger.warn(err.message);
}
return code;
}
},
Expand Down

0 comments on commit fa5051f

Please sign in to comment.