-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
48 lines (46 loc) · 1.42 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
var path = require('path'),
webpack = require('webpack'),
WebpackNotifierPlugin = require('webpack-notifier'),
CircularDependencyPlugin = require('circular-dependency-plugin');
console.log(path.join(__dirname, './docs/assets/athenajs.png'));
module.exports = {
entry: [
'./js/athena-module.js'
],
output: {
path: __dirname,
filename: "dist/athena.js",
pathinfo: true,
library: 'AthenaJS',
libraryTarget: 'umd'
},
devtool: 'source-map',
module: {
rules: [
{ test: /fpscounter/, loader: 'exports-loader?fpscounter' },
{ test: /virtualJoystick/, loader: 'exports-loader?VirtualJoystick' },
{
test: /\.js$/, loader: 'babel-loader', options: {
presets: ['@babel/preset-env']
}, exclude: [/node_modules/]
}
]
},
resolve: {
modules: ['node_modules']
},
plugins: [
new CircularDependencyPlugin({
// exclude detection of files based on a RegExp
exclude: /a\.js/,
// add errors to webpack instead of warnings
failOnError: true
}),
new WebpackNotifierPlugin({
alwaysNotify: true,
skipFirstNotification: true,
title: 'AthenaJS',
contentImage: path.join(__dirname, './docs/assets/athenajs.png')
})
]
};