-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
36 lines (35 loc) · 995 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
const path = require('path');
const rxPaths = require('rxjs/_esm5/path-mapping');
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
/**
* TODO
* This is just a stub, the resulting output bundle is far from being optimal. We must either use ES2015 modules for
* typescript compilation or use awesome-typescript-plugin for tree shaking to work. Right now ALL of rxjs gets
* bundled.
*/
module.exports = {
entry: "./src/index",
output: {
path: path.resolve(__dirname, "dist/bundles/"),
filename: "reactive-state.umd.js",
library: "ReactiveState",
libraryTarget: "umd"
},
resolve: {
alias: rxPaths(),
modules: [
"node_modules"
],
extensions: [".js"],
},
module: {
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new UglifyJSPlugin()
],
context: __dirname,
target: "web",
mode: "production"
}