npm i stringify-object-values
Stringifies each value of an object. This is useful when paired with Webpack's DefinePlugin.
var stringify = require('stringify-object-values');
stringify({
  hello: 'world',
  favorite: 1,
  equation: '1+1',
  random: {},
  arr: []  
});
/* {
  hello: "'world'",
  favorite: 1,
  equation: "'1+1'",
  random: "{}",
  arr: "[]"
} */var webpack = require('webpack');
var stringify = require('stringify-object-values');
module.exports = {
  plugins: [
    new webpack.DefinePlugin({ 'process.env': stringify(process.env) });
  ]
}