-
Notifications
You must be signed in to change notification settings - Fork 15
/
webpack.config.js
47 lines (45 loc) · 926 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
40
41
42
43
44
45
46
47
const webpack = require('webpack');
const { version } = require('./package.json');
module.exports = {
name: 'browser',
mode: 'production',
entry: './index.js',
output: {
path: `${__dirname}/dist`,
filename: 'kuzzle.js',
library: 'KuzzleSDK',
libraryTarget: 'umd'
},
target: 'web',
watch: false,
devtool: 'cheap-module-source-map',
node: false,
module: {
rules: [
{
test: /\.?js$/,
use: {
loader: 'babel-loader'
}
}
]
},
plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^(http|min-req-promise|package|ws)$/
}),
new webpack.DefinePlugin({
SDKVERSION: JSON.stringify(version),
BUILT: true
}),
new webpack.BannerPlugin('Kuzzle Javascript SDK version ' + version),
],
resolve: {
fallback: {
buffer: false,
http: false,
https: false,
url: false,
}
},
};