carteb / carte-blanche

An isolated development space with integrated fuzz testing for your components. See them individually, explore them in different states and quickly and confidently develop them.
https://www.youtube.com/watch?v=6g3-TQ6aaw8
MIT License
1.5k stars 47 forks source link

/carte-blanche URL does not work #302

Closed tomduncalf closed 8 years ago

tomduncalf commented 8 years ago

I tried adding carte-blanche to a simple project of mine, but when running it, http://localhost:3000/carte-blanche does not load Carte Blanche – it just loads the app instead (which does not use react-router at the minute as it's just one page)

I wonder if I need to change something in the dev server? Or is react-router a requirement perhaps? I've not had a chance to look into how Carte Blanche works or what exactly might be affecting it working in this case (I have seen it loading with a repo based on Max's boilerplate) but have pushed a stripped down version of the repo to https://github.com/tomduncalf/carte-blanche-bug if anyone is able to take a look and let me know where I might be going wrong!

Thanks

wmertens commented 8 years ago

Can you post your webpack configuration? Basically, the carte blanche files are generated to reside under /carte-blanche on your webpack-dev-server, so you need to be able to get there. If you run it on a different port, you need to go to that port.

tomduncalf commented 8 years ago

Sure, here it is: https://raw.githubusercontent.com/tomduncalf/carte-blanche-bug/master/webpack.config.js

http://localhost:3000 is definitely hitting the dev server, but http://localhost:3000/carte-blanche just shows the same page as /. No doubt I have done something silly ;)

wmertens commented 8 years ago

you have publicPath set to /static, which means that the url is http://localhost:3000/static/carte-blanche. Try removing that, see also #304 for why it won't work :)

tomduncalf commented 8 years ago

Ah excellent, thank you! I'll try that out when I get home. I use publicPath so that my dev server JS lives in the same place as my built JS (/static/index.js) – is there a better way to do this? It's not a problem to use /static in the carte-blanche URL really

wmertens commented 8 years ago

No, I think using a prefix is great, carte-blanche should just fix this situation.

tomduncalf commented 8 years ago

Cool, I've 👍 your other issue, thanks for the help :)

mxstbr commented 8 years ago

Yes, definitely a bug on our side, got an idea how to fix it already though! Sorry for the troubles!

hugooliveirad commented 8 years ago

@mxstbr any news here? Real blocker for us. I've got an idea on how to do this too.

mxstbr commented 8 years ago

Not as of yet, I'm afraid. If you want to take a look that'd be much appreciate, feel free to submit a WIP Pull Request and we can do it together!

(Also, joining the chat might be good for discussions: https://gitter.im/carteb/carte-blanche)