module.exports = {
  context: __dirname,
  entry: './src/index.jsx',
  output: {
    path: './build',
    filename: 'index.js',
    library: 'CalendarHeatmap',
    libraryTarget: 'var'
  },
  resolve: {
    extensions: ['', '.js', '.jsx'],
    modulesDirectories: ['node_modules']
  },
  externals: {
    'react': {
      root: 'React',
      commonjs2: 'react',
      commonjs: 'react',
      amd: 'react'
    }
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules)/,
        loader: 'babel'
      }
    ]
  }
};

module.exports = {
  context: __dirname,
  entry: './src/index.jsx',
  output: {
    path: './build',
    filename: 'index.js',
    library: 'CalendarHeatmap',
    libraryTarget: 'umd'
  },
  resolve: {
    extensions: ['', '.js', '.jsx'],
    modulesDirectories: ['node_modules']
  },
  externals: {
    'react': {
      root: 'React',
      commonjs2: 'react',
      commonjs: 'react',
      amd: 'react'
    }
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules)/,
        loader: 'babel'
      }
    ]
  }
};

Switch libraryTarget from var to umd
Switch libraryTarget from var to umd
