-
Notifications
You must be signed in to change notification settings - Fork 11
/
webpack-release.config.js
44 lines (42 loc) · 972 Bytes
/
webpack-release.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
var path = require('path');
var webpack = require('webpack');
var loaders = require("./webpack-loaders");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var PATHS = {
app: path.join(__dirname, 'src/index.release.ts'),
build: path.join(__dirname, 'builds'),
dist: path.join(__dirname, 'dist')
};
module.exports = {
devtool: "source-map",
debug: true,
entry: [
PATHS.app
],
output: {
path: PATHS.dist,
filename: 'app.js'
},
resolve: {
root: __dirname,
extensions: ['', '.ts', '.js', '.json', '.scss']
},
module: {
loaders: loaders
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.optimize.DedupePlugin(),
new ExtractTextPlugin("app.css"),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
verbose: true,
minimize: true,
mangle: false,
compress: {
warnings: true
}
})
]
};