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
Closed

example webpack typescript repo #700

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

Comments

@matt-erhart
Copy link

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
Copy link

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

@dahlbyk
Copy link

dahlbyk commented Apr 6, 2017

Griddle now has a working TypeScript Storybook, too.

@GeeWee
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
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
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.

@nareshbhatia
Copy link

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
Copy link

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
Projects
None yet
Development

No branches or pull requests

6 participants