-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.production.config.js
45 lines (44 loc) · 1.31 KB
/
webpack.production.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
/*eslint-env node*/
const webpack = require('webpack'),
WebpackNotifierPlugin = require('webpack-notifier'),
CircularDependencyPlugin = require('circular-dependency-plugin');
module.exports = {
entry: [
'./js/athena-module.js'
],
output: {
path: __dirname,
filename: 'dist/athena.js',
pathinfo: true,
library: 'AthenaJS',
libraryTarget: 'umd'
},
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 webpack.optimize.UglifyJsPlugin({ comments: false }),
new WebpackNotifierPlugin({
alwaysNotify: true,
skipFirstNotification: true,
title: 'AthenaJS-Gods'
})
]
};