code: function buildConfig(wantedEnv) {
    let isValid = wantedEnv && wantedEnv.length > 0 && allowedEnvs.indexOf(wantedEnv) !== -1;
    let validEnv = isValid ? wantedEnv : 'dev';
    let config = require(path.join(__dirname, 'cfg/' + validEnv));
    return config;
  }
docs: Build the webpack configuration
  @param  {String} wantedEnv The wanted environment
  @return {Object} Webpack config