-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
54 lines (52 loc) · 1.26 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
var path = require('path'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
WebpackNotifierPlugin = require('webpack-notifier');
module.exports = {
entry: [
'./gods/js/gods.js'
],
output: {
path: __dirname,
filename: "bundle.js",
pathinfo: true
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader?presets[]=es2015',
exclude: /node_modules|athena\.js/
},
{
test: /athena\.js$/,
use: ["source-map-loader"],
enforce: "pre"
}
]
},
devServer: {
host: '0.0.0.0',
port: '8888',
// inline hot-reload
inline: true
},
resolve: {
modules: [
'node_modules'
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Gods - AthenaJS',
template: 'index-wp.ejs',
inject: 'body'
}),
new WebpackNotifierPlugin({
alwaysNotify: true,
skipFirstNotification: true,
title: 'AthenaJS-Gods',
contentImage: path.join(__dirname, './gods/img/godsIntro.jpg')
})
]
};