forked from bradleykirby/WallaceTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.prod.config.js
More file actions
56 lines (54 loc) · 1.57 KB
/
webpack.prod.config.js
File metadata and controls
56 lines (54 loc) · 1.57 KB
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
53
54
55
56
var ExtractTextPlugin = require("extract-text-webpack-plugin");
let ngTools = require('@ngtools/webpack');
let webpack = require('webpack');
let path = require('path');
module.exports = {
entry: {
app: './src/ng-app/main-prod.ts'
},
output: {
path: './dist',
filename: 'app.bundle.js'
},
devtool: "source-map",
resolve: {
extensions: ['.ts', '.js', '.scss', '.html']
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('css-loader?sourceMap!sass-loader?sourceMap')
},
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
{
test: /\.html$/,
loader: 'raw-loader'
},
]
},
plugins: [
new ExtractTextPlugin("styles.css"),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
output: {
comments: false
},
sourceMap: true
})
// new ngTools.AotPlugin({
// tsConfigPath: path.join(process.cwd(), 'tsconfig.aot.json'),
// baseDir: process.cwd(),
// entryModule: path.join(process.cwd(), 'src', 'app', 'app.module') + '#AppModule'
// }),
]
};