Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80480 views
1
'use strict';
2
3
var webpack = require('webpack');
4
5
var plugins = [
6
new webpack.DefinePlugin({
7
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
8
}),
9
10
];
11
12
if (process.env.NODE_ENV === 'production') {
13
plugins.push(
14
new webpack.optimize.UglifyJsPlugin({
15
compressor: {
16
warnings: false
17
}
18
})
19
);
20
}
21
22
module.exports = {
23
24
output: {
25
library: 'Flummox',
26
libraryTarget: 'var'
27
},
28
29
plugins: plugins,
30
31
resolve: {
32
extensions: ['', '.js']
33
},
34
35
module: {
36
loaders: [
37
{ test: /\.js$/, loaders: ['babel-loader?stage=0&loose=all'], exclude: /node_modules/ }
38
]
39
}
40
};
41
42