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

feat: allow for main.ts or any other file extension #391

Merged
merged 4 commits into from
Nov 5, 2022

Conversation

dannyhw
Copy link
Member

@dannyhw dannyhw commented Nov 3, 2022

Issue: #390

What I did

Added logic to allow any file extension for main.

How to test

run the stories loader script for a project with main.ts

@diginikkari
Copy link

I think this should also be tested using very common `default export' format. Not only extension change.:

import type { StorybookConfig } from '@storybook/core-common';

const config: StorybookConfig = {
  stories: ['./FakeStory.stories.tsx'],
  addons: [
    '@storybook/addon-ondevice-notes',
    '@storybook/addon-ondevice-controls',
    '@storybook/addon-ondevice-backgrounds',
    '@storybook/addon-ondevice-actions',
  ],
};

export default config;

@dannyhw
Copy link
Member Author

dannyhw commented Nov 3, 2022

@diginikkari test case added and a fix for default exports.

@diginikkari
Copy link

@dannyhw looks good 👍 Now with the watcher changes this should help working with typescript 😀.
I'm so happy how RN Storybook is getting closer to current storybook. When having used to develop components in isolation with web it's so nice to be able to do it also with RN.

@dannyhw dannyhw merged commit 644e801 into next-6.0 Nov 5, 2022
@dannyhw
Copy link
Member Author

dannyhw commented Nov 5, 2022

@diginikkari thats really great to hear, thanks :).

We have some cool plans for react native in future too 😄

@diginikkari
Copy link

We have some cool plans for react native in future too 😄

oh, looking forward to those 👀

@dannyhw dannyhw deleted the feat/any-file-extension branch February 2, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants