title: 'ReferenceError: require is not defined' in the es6 development environment
body: <p>I've got an error('ReferenceError: require is not defined')<br>
  in the following syntax, and I using '@babel/preset-env' now.<br>
  How do I solve this problem?</p>
  
  <blockquote>
    <p>const _ = require("lodash.template");</p>
  </blockquote>
  
  <p>(I am trying to use the lodash library in the es6 development environment.)</p>
  
  <p><br></p>
  
  <p>package.json</p>
  
  <pre><code>"@babel/preset-env": "^7.0.0"
  </code></pre>
  
  <p>webpack.config.js</p>
  
  <pre><code>presets: ['@babel/preset-env']
  </code></pre>
  
  <p>The entire Webpack config looks like this:</p>
  
  <pre><code>const webpack = require('webpack');
  const path = require('path');
  
  module.exports = {
      entry: './src/js/App.js',
      output: {
          path: path.resolve(__dirname, 'dist'),
          publicPath: '/dist/',
          filename: 'bundle.js'
      },
      module: {
          rules: [
              {
                  test: /\.js$/,
                  include: path.join(__dirname),
                  exclude: /(node_modules)|(dist)/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ['@babel/preset-env']
                      }
                  }
              }
          ]
      }
  };
  </code></pre>
  
  <p>some context of of the usage:</p>
  
  <pre><code>let litemplate  =`&lt;li class="id"&gt;[&lt;%=data[i].id%&gt;]&lt;/li&gt;`;
  let listemplate = _.template(litemplate);
  </code></pre>