<commit_before>require('dotenv/config')
const { DefinePlugin } = require('webpack')

module.exports = {
  webpack: config => {
    config.plugins = config.plugins
      .filter(plugin =>
        process.env.NODE_ENV === 'production' ||
        plugin.constructor.name !== 'UglifyJsPlugin'
      )
      .concat(new DefinePlugin({
        'process.env.API_URL': JSON.stringify(process.env.API_URL)
      }))
    return config
  }
}<commit_msg>Move reliance on NODE_ENV from next config. #35<commit_after>require('dotenv/config')
const { DefinePlugin } = require('webpack')

module.exports = {
  webpack: (config, { dev }) => {
    config.plugins = config.plugins
      .filter(plugin => dev
        ? plugin.constructor.name !== 'UglifyJsPlugin'
        : true
      )
      .concat(new DefinePlugin({
        'process.env.API_URL': JSON.stringify(process.env.API_URL),
        'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
      }))
    return config
  }
}
{'fraction_non_alphanumeric': 0.14521112255406798, 'fraction_numerical': 0.0020597322348094747, 'mean_word_length': 2.935222672064777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5681692', 'n_tokens_mistral': 303, 'n_tokens_neox': 295, 'n_words': 50}