-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.config.prod.js
52 lines (49 loc) · 1.08 KB
/
webpack.config.prod.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
48
49
50
51
52
var path = require('path');
var webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: {
app: './src/index.js',
vendor : ['rxjs']
},
devtool : '#source-map',
output: {
path: path.join(__dirname,"dist"),
filename: '[name].js',
publicPath : "http://localhost:8080/assets"
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel-loader']
},{
test: /\.s?css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: "css-loader!postcss-loader!sass-loader"
})
},{
loader: 'json-loader',
test: /\.json$/
} ]
},
node: {
fs: 'empty',
module: 'empty',
net: 'empty',
tls: "empty"
},
plugins: [
new ExtractTextPlugin("styles.css"),
new UglifyJSPlugin({
compress: {
drop_console : true
}
})
],
externals: {
codemirror: 'CodeMirror'
}
};