Possible issue with declaring production environments
Closed this issue · 3 comments
dalebaldwin commented
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
Actually might also be related, hot reloading doesn't work either.
sekoyo commented
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
Was showing Undefined so not sure what was causing it.