forked from ga-wdi-boston/html-css-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.js
89 lines (82 loc) · 1.89 KB
/
webpack.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
83
84
85
86
87
88
89
'use strict'
const webpack = require('webpack')
const path = require('path')
module.exports = {
options: {
entry: {
application: './index.js',
specs: './spec/_all.js',
vendor: ['jquery', 'bootstrap-sass']
},
output: {
filename: '[name].js',
path: path.join(__dirname, '/../public'),
publicPath: 'public/'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: Infinity
}),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015']
}
},
{
test: /\.css/,
loader: 'style!css',
includePaths: [path.resolve(__dirname, './node_modules')]
},
{
test: /\.scss/,
loader: 'style!css!sass',
includePaths: [path.resolve(__dirname, './node_modules')]
},
{
test: /\.woff[\d]?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url-loader?limit=10000&mimetype=application/font-woff'
},
{
test: /\.(ttf|eot|svg|png|jpg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader'
},
{
test: /\.(hbs|handlebars)$/,
loader: 'handlebars-loader',
query: {
helperDirs: [
path.join(__dirname, '/../assets/scripts/templates/helpers')
]
}
}
]
},
resolve: {
alias: {
handlebars: 'handlebars/dist/handlebars.js'
}
},
stats: {
colors: true,
modules: true,
reasons: true
}
},
build: {
failOnError: true,
watch: false,
keepalive: false
}
}