react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

V4 -- path problems for generated components #253

Closed sthzg closed 8 years ago

sthzg commented 8 years ago

I will add a unit test to illustrate this after posting the issue. To manually recreate:

yo react-webpack:component hello
#   create src/components/hello.cssmodule.less
#   create src/components/Hello.js
#   create test/components/HelloTest.js

cat test/components/HelloTest.js
#   ...
#   import Hello from 'components//Hello.js';
#                                ˜˜

As illustrated, when generating components wo/ a nested namespace (i.e. opposed to yo react-webpack:component my/hello) it will print two slashes.

sthzg commented 8 years ago

Closed with #254