-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
66 lines (65 loc) · 1.33 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
var path = require('path');
var BowerWebpackPlugin = require('bower-webpack-plugin');
var pkg = require('./package.json');
module.exports = {
entry: {
app: `${pkg.folders.app}/bootstrap.js`
},
output: {
path: `${pkg.folders.public}/js`,
filename: '[name].bundle.js'
},
resolve: {
modulesDirectories: [
'./node_modules',
'./public/bower_components'
],
alias: {
'@data': path.resolve(pkg.folders.data),
'@views': path.resolve(pkg.folders.views)
}
},
externals: [
'angular',
'jQuery',
'$'
],
watch: true,
keepalive: true,
failOnError: false,
module: {
loaders: [
{
test: /\.(jpe|jpg|woff|woff2|eot|ttf|svg)(\?.*$|$)/,
loader: 'url-loader?importLoaders=1&limit=100000'
},
{
test: /\.less$/,
loader: 'style!css!less'
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /(\.html|\.tmpl)/,
loader: 'html'
},
{
test: /\.js$/,
loader: 'babel',
include: path.resolve(pkg.folders.app),
query: {
plugins: ['transform-runtime'],
presets: ['es2015', 'stage-1']
}
}
]
},
plugins: [
// get Bower components
new BowerWebpackPlugin({
excludes: /.*\.(less|png|gif|css)$/
})
]
};