forked from CacheControl/json-rules-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (29 loc) · 818 Bytes
/
webpack.config.js
File metadata and controls
31 lines (29 loc) · 818 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
const path = require('path');
const webpack = require('webpack');
let commitHash = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString()
.replace(/(\r\n|\n|\r)/gm, "");
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: `bundle.${commitHash}.[contenthash].js`,
library: 'jre',
libraryTarget: 'var'
},
plugins: [
// Needed to bypass the setTimeout
// used by EventEmitter
// Since we do NOT actually pass in a non-zero
// and we do not need things to execute on a separate thread
// we can just execute the method immediately
new webpack.DefinePlugin({
setTimeout: '(fn => fn())',
}),
new webpack.EnvironmentPlugin({
DEBUG: false,
})
],
mode: 'production',
};