forked from glorioustephan/events-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
45 lines (44 loc) · 923 Bytes
/
webpack.config.js
File metadata and controls
45 lines (44 loc) · 923 Bytes
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
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: [
'./app/app.js',
'./styles/main.scss'
],
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.hbs$/,
use: 'handlebars-loader'
},
{
test: /\.(sass|scss)$/,
use: ExtractTextPlugin.extract(['css-loader?url=false', 'sass-loader'])
}
]
},
devtool: '#source-map',
devServer: {
historyApiFallback: true
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
}),
new ExtractTextPlugin({
filename: 'bundle.css',
allChunks: true
}),
new HtmlWebpackPlugin({
template: 'templates/index.hbs',
filename: 'index.html'
})
]
};