forked from Criptext/Monkey-SDK-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
31 lines (31 loc) · 787 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
var path = require('path');
var webpack = require('webpack');
module.exports = {
target: 'web',
entry: path.join(__dirname, 'main.js'),
output: {
path: path.join(__dirname, 'dist'),
publicPath: 'monkey/dist/',
filename: 'monkey.js',
libraryTarget: 'umd',
library: 'Monkey'
},
module: {
loaders: [
{ test: /(main\.js|MOKMessage\.js)$/,
loader: 'babel-loader',
exclude: /(node_modules|bower_components)/,
query: {
presets: ['es2015']
}
}
]
},
plugins: [
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
}),
// new webpack.IgnorePlugin(/(jsencrypt.min.js)$/)
new webpack.IgnorePlugin(/(io\.js|node12\.js)$/, /node-rsa/)
]
};