aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/webpack.config.js
blob: 92c4530e7fea7b40fbbd5ad452b910eff7c6641a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const webpack = require("webpack")
const path = require("path")

module.exports = {
  entry: {
    "activestorage": path.resolve(__dirname, "app/javascript/activestorage/index.js"),
  },

  output: {
    filename: "[name].js",
    path: path.resolve(__dirname, "app/assets/javascripts"),
    library: "ActiveStorage",
    libraryTarget: "umd"
  },

  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader"
        }
      }
    ]
  }
}