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.87k stars 355 forks source link

Including bower components #157

Closed ZigaVukcevicDev closed 8 years ago

ZigaVukcevicDev commented 8 years ago

Hi,

how can I include bower components? They should be located in root.

Should I include them in index.html or in Main.js? I think I am having problem accessing bower components folder because it is parent of src folder.

Thank you in advance.

weblogixx commented 8 years ago

Hi @be-codified, I will look into this and update the Generator with this feature. In the mean time, you could look if the given module you want to include is not also available via the npm registry.

weblogixx commented 8 years ago

Hi @be-codified,

I just updated the generator to include support for bower. I tested it with:

bower install jquery

# src/components/MainComponent.js
var jq = require('jquery');
console.log(jq);

Newly generated projects should now have bower support. If you want to include it in already set up projects, just add the adjustments from https://github.com/weblogixx/react-webpack-template/commit/827dd86a3cd2fc52d2918a84bd2e416b92e05320.

Hope this helps :)

ZigaVukcevicDev commented 8 years ago

Hi @weblogixx,

thank you :)

weblogixx commented 8 years ago

You are welcome :)