forked from kuzzleio/sdk-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (46 loc) · 1008 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'),
version = require('./package.json').version;
module.exports = {
name: 'browser',
mode: 'production',
entry: './index.js',
output: {
path: `${__dirname}/dist`,
filename: 'kuzzle.js',
library: {
root: 'KuzzleSDK',
amd: 'kuzzle-sdk',
commonjs: 'kuzzle-sdk'
},
libraryTarget: 'umd'
},
target: 'web',
watch: false,
devtool: 'cheap-module-source-map',
node: false,
module: {
rules: [
{
test: /\.?js$/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.?js$/,
exclude: /node_modules/,
loader: 'eslint-loader'
}
]
},
plugins: [
new webpack.IgnorePlugin(/^(http|min-req-promise|package|ws)$/),
new webpack.DefinePlugin({
SDKVERSION: JSON.stringify(version),
BUILT: true
}),
new webpack.BannerPlugin('Kuzzle javascript SDK version ' + version),
new webpack.optimize.OccurrenceOrderPlugin()
]
};