NODE_ENV documentation incorrect
mbfisher opened this issue · comments
The 'Environment Variables' section of the README states that NODE_ENV
is avaiable both on the client and server, however, NODE_ENV
is not defined in the browser when running sku start
.
The DefinePlugin
is configured by composing envVars
, which does not contain NODE_ENV
, and some production specific variables, which does include NODE_ENV
, but only when it's value is production
.
If I log the plugins section of my computed webpack config I get:
[ DefinePlugin {
definitions:
{ 'process.env.SKU_TENANT': '""',
'process.env.SKU_ENV': '"development"',
'process.env.PORT': '8080' } },
Is this a bug, i.e. we should be setting NODE_ENV
in development, or do you prefere SKU_ENV
and the docs are out of date? My preference would be to include NODE_ENV
as it's so widely used.
Mike
I've let this go a bit stale - unless there are any objections I'm going to raise a PR that sets both NODE_ENV
and SKU_ENV
in client code and update the docs.
I believe this has been addressed with #215
Please re-open if the issue still exists.