tj / frontend-boilerplate

webpack-react-redux-babel-autoprefixer-hmr-postcss-css-modules-rucksack-boilerplate (unmaintained, I don't use it anymore)
2.93k stars 268 forks source link

<noscript data-reactid=".0"></noscript> #54

Closed wieringen closed 8 years ago

wieringen commented 8 years ago

I am trying to create a production build but after I run 'npm run build' and open the static dir on localhost in my browser. I see a blank index page with these elements.

<div id="root"><noscript data-reactid=".0"></noscript></div>

What am I doing wrong?

tj commented 8 years ago

no clue :D I haven't done any prod builds yet so that part might not be ideal

firsara commented 8 years ago

@wieringen as far as I've tested this now it works fine as long as you're index.html is in the root. i.e. if you're going to say http://localhost:3000/static/ it will output <noscript[... in such cases either set a tag in index.html or adjust the main Route in index.js before building:

<Route path="/" component={App}>

@tj maybe an environment based config?

tj commented 8 years ago

hmmm I don't think it would ever not be root for me personally

firsara commented 8 years ago

well for me neither but it would at least fix this issue. anyways i think having a split up local and remote configuration in general wouldn't be that bad for a boilerplate.

tj commented 8 years ago

true true, might use it for feature flags or something. in general I'm trying to keep it to a minimal set of things I actually use. I'll come back to it if I end up using some flags :D

firsara commented 8 years ago

sure, that's totally understandable. it kinda needs to stay a boilerplate, not a framework, right (or planning on something bigger)? ;) Although I would not mind about that one single config file. but it's your repo so feel free to drop it

tj commented 8 years ago

yep just boiler for now, definitely not attempting to make it work for everyone, that's what I found most boilers were so I wanted something a bit cleaner that wasn't trying to cater to everyone's needs