forked from mattermost/mattermost-redux
-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
34 lines (33 loc) · 940 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
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
const path = require('path');
const UglifyPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: {
client4: './src/client/client4.js',
websocket: './src/client/websocket_client.js',
},
output: {
path: path.resolve(__dirname, 'lib'),
library: ['Mattermost', '[name]'],
filename: 'mattermost.[name].js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env', 'stage-0', 'flow'],
},
},
},
],
},
plugins: [
new UglifyPlugin({sourceMap: true}),
],
devtool: 'source-map',
};