-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
38 lines (35 loc) · 957 Bytes
/
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
var path = require('path'),
webpack = require('webpack');
module.exports = {
cache: true,
debug: true,
entry: {
app: './app/app'
},
output: {
path: path.join(__dirname, 'dist'),
publicPath: 'dist/',
filename: '[name].js',
chunkFilename: '[chunkhash].js'
},
module: {
loaders: [
// required to write 'require('./style.css')'
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.js$/, loader: 'babel' },
// required for bootstrap icons
{ test: /\.woff$/, loader: 'url?prefix=font/&limit=5000&mimetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)$/, loader: 'file?prefix=font/' },
],
noParse: /\.min\.js/
},
plugins: [
new webpack.ProvidePlugin({
// Automatically detect jQuery and $ as free var in modules
// and inject the jquery library
// This is required by many jquery plugins
jQuery: 'jquery',
$: 'jquery'
}),
]
};