<NME> webpack.config.js
<BEF> const path = require('path');

module.exports = {
  entry: ['./lib/index.js',
  ],

  target: process.env.TARGET ? `${process.env.TARGET}` : 'web',

  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: `keen-tracking${
      process.env.OPTIMIZE_MINIMIZE ? '.min' : ''
    }.js`,
    library: `${!process.env.LIBRARY ? '' : process.env.LIBRARY}`,
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: `${
      process.env.TARGET ? `${process.env.TARGET}/` : ''
    }${
      fileName
    }${
      process.env.OPTIMIZE_MINIMIZE ? '.min' : ''
    }.js`,
    library: `${!process.env.LIBRARY ? '' : process.env.LIBRARY}`,
    libraryTarget: 'umd',
  },

  module: {

    rules: [
      {
        test: /\.js?$/,
        include: [
          path.resolve(__dirname, 'lib'),
        ],
        exclude: [
          path.resolve(__dirname, 'node_modules'),
        ],
        loader: 'babel-loader',
      },

      {
        test: /\.html$/,
        loader: 'html-loader',
      },
    ],

  },

  resolve: {
    modules: [
      'node_modules',
    ],
    extensions: ['.js', '.json', '.jsx', '.css', '.scss'],
    alias
  },

  optimization: {
    minimize: !!process.env.OPTIMIZE_MINIMIZE,
  },

  devtool: 'source-map',

  context: __dirname,

  // stats: 'verbose',

  plugins: [
    new webpack.DefinePlugin(definePluginVars)
  ],

  mode: process.env.NODE_ENV,
    open: true,
    inline: true,
    hot: false,
  },

};
    'promise-polyfill': 'promise-polyfill'
  } : {
  },

};

<MSG> imports exports es5

<DFF> @@ -1,14 +1,20 @@
 const path = require('path');
 
+const fileName = 'keen-tracking';
+
 module.exports = {
-  entry: ['./lib/index.js',
+  entry: ['./lib/browser.js',
   ],
 
   target: process.env.TARGET ? `${process.env.TARGET}` : 'web',
 
   output: {
     path: path.resolve(__dirname, 'dist'),
-    filename: `keen-tracking${
+    filename: `${
+      process.env.TARGET ? `${process.env.TARGET}/` : ''
+    }${
+      fileName
+    }${
       process.env.OPTIMIZE_MINIMIZE ? '.min' : ''
     }.js`,
     library: `${!process.env.LIBRARY ? '' : process.env.LIBRARY}`,
@@ -73,6 +79,14 @@ module.exports = {
     open: true,
     inline: true,
     hot: false,
+    watchContentBase: true,
+  },
+
+  externals: process.env.TARGET === 'node' ? {
+    'component-emitter' : 'component-emitter',
+    'js-cookie' : 'js-cookie',
+    'keen-core' : 'keen-core',
+  } : {
   },
 
 };

{'addition_count': 16, 'commit_subject': 'imports exports es5', 'deletion_count': 2, 'file_extension': '.js', 'lang': 'config', 'license': 'mit', 'repo_name': 'keen/keen-tracking.js'}