webpack.config.js 616 B

1234567891011121314151617181920212223242526272829303132
  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. };