-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.config.base.js
More file actions
48 lines (44 loc) · 820 Bytes
/
webpack.config.base.js
File metadata and controls
48 lines (44 loc) · 820 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
43
44
45
46
47
48
'use strict';
var _ = require('lodash');
var path = require('path');
var webpack = require('webpack');
var reactExternal = {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
};
var reduxExternal = {
root: 'Redux',
commonjs2: 'redux',
commonjs: 'redux',
amd: 'redux'
};
module.exports = {
externals: {
'react': reactExternal,
'redux': reduxExternal
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader'],
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules', 'lodash')
]
}
]
},
node: {
process: false
},
output: {
library: 'ReactInlineGrid',
libraryTarget: 'umd'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin()
]
};