forked from jfdoube/oncha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (38 loc) · 938 Bytes
/
webpack.config.js
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
// webpack.config.js
const webpack = require('webpack')
const path = require('path')
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
compose: './compose/index.js',
curry: './curry/index.js',
map: './map/index.js',
either: './either/index.js',
list: './list/index.js',
fork: './fork/index.js',
future: './future/index.js',
id: './id/index.js',
maybe: './maybe/index.js',
},
output: {
path: path.join(__dirname, '/package'),
filename: '[name].js',
libraryTarget: 'umd',
library: 'oncha',
},
module: {
rules: [
{
test: /\.js$/,
include: [path.resolve('./src')],
exclude: /(node_modules|bower_components)/,
use: [{ loader: 'babel-loader' }],
},
],
},
resolve: {
extensions: ['.js'],
modules: [path.resolve('src'), 'node_modules'],
},
plugins: [new webpack.optimize.UglifyJsPlugin()],
}