forked from trufflesuite/drizzle-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (37 loc) · 985 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
const path = require('path');
process.env.BABEL_ENV = 'production';
module.exports = {
devtool: 'inline-source-map',
entry: './src/index.js',
output: {
filename: 'drizzle.js',
library: 'drizzle',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'dist')
},
mode: 'development',
module: {
rules: [{
test: /\.(js)$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: [
require('babel-plugin-transform-runtime'),
require('babel-plugin-transform-es2015-arrow-functions'),
require('babel-plugin-transform-object-rest-spread'),
require('babel-plugin-syntax-async-functions')
]
}
}]
},
externals: {
'eth-block-tracker': 'eth-block-tracker-es5',
'redux': 'redux',
'redux-saga': 'redux-saga',
'web3': 'web3',
'is-plain-object': 'is-plain-object',
'deepmerge': 'deepmerge'
}
};