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

Storyshots - Support .cjs and .mjs file extensions #19726

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

smoores-dev
Copy link
Contributor

Issue:

In a native ESM project, the standard Storybook main.js file might need to be written as a CommonJS file, and therefore named with a .cjs extension.

What I did

Added .cjs and .mjs to the list of supported extensions for configuration files in the Storyshots addon. These are valid extensions for Javascript source code files, and Jest has no issue requiring them.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

In a native ESM project, the standard Storybook `main.js` file
might need to be written as a CommonJS file, and therefore named
with a .cjs extension.
@ndelangen ndelangen self-assigned this Nov 7, 2022
@ndelangen ndelangen added addon: storyshots maintenance User-facing maintenance tasks labels Nov 7, 2022
@ndelangen ndelangen merged commit 9a07fcb into storybookjs:next Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: storyshots maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants