const path = require("path");
const webpack = require('webpack');

module.exports = {
  entry: "./src/index.js",
  mode: "production",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "line_heatmap.js",
    library: 'line_heatmap',
    libraryTarget: 'umd'
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /(node_modules)/,
        use: {
          loader: "babel-loader",
          options: {
            presets: ["@babel/preset-env"]
          }
        }
      }
    ]
  },
  plugins: [
    new webpack.ProvidePlugin({
      noUiSlider: 'nouislider'
    })
  ],
  devtool: 'source-map'
};