webpack.config.js 573 Bytes
Newer Older
1
const path = require('path');
2

3 4
module.exports = {
  entry: ['core-js/fn/array/from', path.resolve(__dirname, 'src/index.js')],
5 6 7 8
  output: {
    path: path.resolve(__dirname, 'dist'),
    libraryTarget: 'umd',
    library: 'feather',
9 10
    // Prevents webpack from referencing `window` in the UMD build
    // Source: https://git.io/vppgU
Cole Bemis's avatar
Cole Bemis committed
11
    globalObject: "typeof self !== 'undefined' ? self : this",
12 13 14 15 16 17 18 19 20 21 22 23
  },
  devtool: 'source-map',
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
      },
    ],
  },
};