aboutsummaryrefslogtreecommitdiff
path: root/config/webpack.js
blob: 98faf6d464048284dc558d2d53567c9a913e7ca9 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';

const Path = require('path');

module.exports = {
  entry: './lib/sorting_hat',

  output: {
    path: Path.resolve(__dirname, '../assets'),
    filename: 'bundle.js',
    publicPath: '/assets/',
    library: 'SortingHat',
    libraryTarget: 'umd'
  },

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /doc/,
        loader: 'babel-loader',
        query: {
          presets: ['es2017']
        }
      }
    ]
  },

  resolve: {
    modules: [
      'node_modules',
      'lib'
    ],

    alias: {
      'vue$': 'vue/dist/vue.esm.js'
    }
  },

  context: Path.resolve(__dirname, '..')
};