webpack.config.js 641 B

123456789101112131415161718192021222324252627282930313233
  1. const path = require("path");
  2. const webpack = require('webpack');
  3. module.exports = {
  4. entry: "./src/index.js",
  5. mode: "production",
  6. output: {
  7. path: path.resolve(__dirname, "dist"),
  8. filename: "line_heatmap.js",
  9. library: 'line_heatmap',
  10. libraryTarget: 'umd'
  11. },
  12. module: {
  13. rules: [
  14. {
  15. test: /\.js$/,
  16. exclude: /(node_modules)/,
  17. use: {
  18. loader: "babel-loader",
  19. options: {
  20. presets: ["@babel/preset-env"]
  21. }
  22. }
  23. }
  24. ]
  25. },
  26. plugins: [
  27. new webpack.ProvidePlugin({
  28. noUiSlider: 'nouislider'
  29. })
  30. ],
  31. devtool: 'source-map'
  32. };