forked from rescribet/link-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
60 lines (58 loc) · 1.25 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var path = require('path');
var libraryName = 'link-redux';
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve('./dist'),
filename: libraryName + '.js',
library: libraryName,
libraryTarget: 'commonjs2'
},
externals: {
// Runtime
'prop-types': 'prop-types',
redux: 'redux',
react: 'react',
'react-redux': 'react-redux',
rdflib: 'rdflib',
'link-lib': 'link-lib',
// Testtime
chai: 'chai',
enzyme: 'enzyme',
'chai-enzyme': 'chai-enzyme',
'sinon-chai': 'sinon-chai',
immutable: 'immutable',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
'react-addons-test-utils': 'react-dom',
'redux-immutable': 'redux-immutable'
},
module: {
rules: [
{
test: /(\.js|\.jsx)$/,
loader: 'babel-loader',
exclude: /(node_modules|bower_components)/,
options: {
presets: [
'react',
'es2015',
'stage-0'
]
}
},
{
test: /.json$/,
use: 'json-loader'
}
]
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
modules: [
path.join(__dirname, 'src'),
'node_modules'
]
}
};