-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (38 loc) · 777 Bytes
/
webpack.config.js
File metadata and controls
42 lines (38 loc) · 777 Bytes
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
42
'use strict';
let webpack = require('webpack');
let pack = require('./package.json');
let path = require('path');
let libraryName = pack.name;
let outputFile = libraryName + '.js';
let config = {
entry: __dirname + '/src/lib',
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: outputFile,
library: libraryName,
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel!eslint',
exclude: /(node_modules|bower_components)/
}
],
eslint: {
failOnWarning: true
}
},
resolve: {
root: path.resolve('./src'),
extensions: ['', '.js']
},
node: {
process: false,
global: false
}
};
module.exports = config;