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

Storybook with TypeScript based application #1541

Closed
sergeyzwezdin opened this issue Jul 28, 2017 · 4 comments
Closed

Storybook with TypeScript based application #1541

sergeyzwezdin opened this issue Jul 28, 2017 · 4 comments

Comments

@sergeyzwezdin
Copy link
Contributor

I've created typescript based React app (with create-react-app) and added storybook there (by using getstroybook CLI command).

I've added webpack.config.js to define ts-loader to transpile my TypeScript code.

I've placed whole code here - https://github.com/sergeyzwezdin/storybook-with-ts

The problem is storybook building takes around 15 seconds with just single story. If I make the same for my real project it takes more than 20 seconds which is quite slow.

I guess this is because of both babel-loader and ts-loader build node_modules folder (I can see this process at console). Any way to avoid building node_modules.

P.S. I'm migrating application from @kadira/storybook to @storybook/react. With @kadira/storybook it worked much faster for me with the same codebase.

@KaySackey
Copy link

You don't have to double up on babel-loader and ts-loader. ts-loader can load javascript for you, and you're transpiling the Typescript down to ES5/commonjs modules anyways.

I'm not seeing anything that should make this so slow, exclude: /node_modules/ should already be excluding your node_modules.

@RWOverdijk
Copy link
Member

Why did you remove the repository?

@stale
Copy link

stale bot commented Nov 23, 2017

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@stale stale bot added the inactive label Nov 23, 2017
@stale
Copy link

stale bot commented Dec 8, 2017

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants