christianalfoni / react-app-boilerplate

React application boilerplate
303 stars 80 forks source link

Unclear how to deal with assets (images) #8

Closed fatso83 closed 9 years ago

fatso83 commented 9 years ago

Where do you place images and other assets in this setup? AFAI can see, it seems I have to constantly copy the directory structures I need to both the dist and the build folder. That gets old quickly ... Do you just add another express.static() folder?

christianalfoni commented 9 years ago

Hi @fatso83 ,

Yeah, the boilerplate i kind of minimalistic. It was intentional though as developers tend to have very different approaches to handling css, less, static stuff like images and fonts.

But as I understood your situation you are running an express server and have one folder for static assets, you have your build folder and the dist folder. So yeah, to me it makes sense to make assets and build your static folders in development and assets and dist when running in production.

Does that comply with what you are trying to achieve?

fatso83 commented 9 years ago

that makes sense. I would perhaps make it a suggestion in the readme, though.

christianalfoni commented 9 years ago

Good point! Done :-)