ericclemmons/start-server-webpack-plugin

pass env

Industrial opened this issue · 2 comments

Hi.

Following https://hackernoon.com/hot-reload-all-the-things-ec0fed8ab0 which uses this package, I am trying to set up a webpack server configuration that starts a server.

I am running NODE_ENV=develop webpack -config server.webpack.config.babel.js and the server being started is using the production HTTP request logger, not the development one, indicating that the child process has a completely different environment from the master.

Is it possible to get the same environment?

@Industrial can you share your webpack config? You can also console.log(process.env) to see what are the differences between the webpack env and the script env.

The environment is being provided by cluster.fork(), so I presume it's the same as the webpack process.

I'm sorry, this was too long ago for me. I'm now using Next.js which includes SSR and HMR :-)