forked from dalamgir/angular-next-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
82 lines (70 loc) · 1.73 KB
/
webpack.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
'use strict';
var webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
autoprefixer = require('autoprefixer'),
ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
module.exports = {
entry: './app/core/bootstrap.ts',
output: {
path: __dirname + '/build',
filename: 'bundle.js'
},
devtool: 'source-map',
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js']
},
module: {
preloaders: [
{
test: /\.ts$/,
loader: 'tslint'
}
],
loaders: [
{
test: /\.html$/,
loader: 'raw',
},
{
test: /\.ts$/,
loader: 'ts'
},
{
test: /\.scss$/,
loader: 'style!css!postcss!sass'
},
{
test: /bootstrap-sass\/assets\/javascripts\//,
loader: 'imports?jQuery=jquery'
},
{
test: /\.(woff2?|svg)$/,
loader: 'url?limit=10000'
},
{
test: /\.(ttf|eot)$/,
loader: 'file'
},
]
},
postcss: function() {
return [autoprefixer];
},
node: {
fs: "empty"
},
plugins: [
new HtmlWebpackPlugin({
title: 'Nightwing - An Application Framework',
filename: './index.html',
template: './app/index.html',
inject: false
}),
new webpack.ProvidePlugin({
jQuery: "jquery"
}),
new ngAnnotatePlugin({
add: true
})
]
};