-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.development.js
46 lines (45 loc) · 1.22 KB
/
webpack.development.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
const path = require('path');
const webpack = require('webpack');
const WebpackSHAHash = require('webpack-sha-hash');
const WebpackCleanupPlugin = require('webpack-cleanup-plugin');
const StatsWriterPlugin = require("webpack-stats-plugin").StatsWriterPlugin;
module.exports = {
context: path.join(__dirname, 'src'),
entry: {
'LoaderBootstrap': './LoaderBootstrap.ts'
},
devtool: "source-map",
output: {
path: path.join(__dirname, 'bin/Debug'),
filename: '[name].[chunkhash].js'
},
module: {
loaders: [
{
test: /\.ts?$/,
loader: "awesome-typescript-loader"
},
{
enforce: "pre",
test: /\.js$/,
loader: "source-map-loader"
}
],
},
plugins: [
new WebpackCleanupPlugin(),
new WebpackSHAHash(),
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true,
sourceMap: true,
comments: false
}),
new StatsWriterPlugin({
filename: "buildMetadata.json"
})
],
resolve: {
extensions: ['.ts', '.js', '.json']
}
};