sekoyo / universal-react

A universal react starter, with routing, meta, title, and data features
242 stars 50 forks source link

Possible issue with declaring production environments #33

Closed dalebaldwin closed 7 years ago

dalebaldwin commented 7 years ago

I've been having a bug with this where the script line in the Root.js file always pulls in the minified version of the file regardless of which build I'm using.

I changed my root code to <script src={process.env.NODE_ENV != 'production' ? '/app.js' : '/app.min.js'} />

That fixed it but not sure if it's due to an error I've made on my end or it's always receiving 'default' regardless of the build options?

dalebaldwin commented 7 years ago

Actually might also be related, hot reloading doesn't work either.

sekoyo commented 7 years ago

That might be a better check, thanks I'll update. Curious what your process.env.NODE_ENV is on, I believe it defaults to undefined

dalebaldwin commented 7 years ago

Was showing Undefined so not sure what was causing it.