-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
52 lines (51 loc) · 1.29 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
/**
* webpack.config.js
* Created by Huxley on 11/30/15.
*/
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: {
ng2: [
'angular2/bundles/angular2-polyfills',
'./www/ng2'
],
app: './www/app'
},
output: {
path: './www/build',
filename: '[name].bundle.js'
},
module: {
preLoaders: [
{test: /\.jsx?$/, loader: "source-map", exclude: [/node_modules/]}
],
loaders: [
{test: /\.html$/, loader: 'raw'},
{test: /\.json$/, loader: 'json'},
{
test: /\.tsx?$/, loader: 'ts',
exclude: [/node_modules/]
},
{test: /\.less$/, loader: 'raw!autoprefixer!less'},
{test: /\.scss$/, loader: 'raw!autoprefixer!sass'}
]
},
resolve: {
extensions: ['', '.json', '.ts', '.js', '.less'],
modulesDirectories: ['node_modules', './ www']
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'ng2',
minChunks: Infinity
})
],
devServer: {
inline: true,
colors: true,
historyApiFallback: true,
contentBase: './www',
publicPath: '/build/'
}
};