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

example webpack typescript repo #700

Closed
matt-erhart opened this Issue Feb 18, 2017 · 7 comments

Comments

6 participants
@matt-erhart
Copy link

matt-erhart commented Feb 18, 2017

Based on other issues, I know some people are using TS with storybook. I've had a bit of trouble getting https://github.com/NewSpring/typescript-react-storybook-addon and https://github.com/jupl/astraea to run. Is there a working webpack/TS repo somewhere that I can use as a reference?

Ideally, I would like to try out storybook on a project using the following webpack config:
https://gist.github.com/matt-erhart/cbab5c767d437c1186a1697095aaa63d.js . Could someone explain how to adapt this config to work with storybook?

@issacsonjj

This comment has been minimized.

Copy link

issacsonjj commented Apr 6, 2017

I wrote a simple one, hope it'll be helpful :)

@dahlbyk

This comment has been minimized.

Copy link

dahlbyk commented Apr 6, 2017

Griddle now has a working TypeScript Storybook, too.

@GeeWee

This comment has been minimized.

Copy link

GeeWee commented Jul 5, 2017

None of the examples work properly for me. Griddles leave '.jsx' and 'js' files in the same directory as the typescript source files, and pollutes the entire repo with temp files, and the one by @issacsonjj doesn't seem to work with the new storybook.

Did you face these two problems @issacsonjj and @dahlbyk ?

@dahlbyk

This comment has been minimized.

Copy link

dahlbyk commented Jul 6, 2017

@GeeWee I don't recall seeing anything like that in my troubleshooting or now. Can you post your tsconfig.json and .storybook/webpack.config.js?

@GeeWee

This comment has been minimized.

Copy link

GeeWee commented Jul 6, 2017

Thanks for the response @dahlbyk.
I ended up figuring it out. What happened was, that somehow my "stories" folder had ended up in the exclude section of the tsconfig - which I assume meant that the outdir was completely ignored for everything, as that's the webpack entry point. Removing that fixed the issue.

@ndelangen ndelangen closed this Jul 7, 2017

@nareshbhatia

This comment has been minimized.

Copy link

nareshbhatia commented Aug 22, 2017

I tried to add Storybook to my TypeScript React app based on the above information. However I am getting an error when running Storybook:

ERROR in ./.storybook/config.js
Module not found: Error: Can't resolve '../stories'

I have a ../stories folder, so I am not sure why I am getting this error. Can someone please take a look at my project and help me figure this problem: https://github.com/archfirst/react-mobx-mui-ts-seed

Thanks in advance.

@nareshbhatia

This comment has been minimized.

Copy link

nareshbhatia commented Aug 23, 2017

FYI, I got help from a colleague to get this working. The project is now updated with a working storybook example: https://github.com/archfirst/react-mobx-mui-ts-seed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.