forked from seedhodler/shamir
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.common.js
45 lines (41 loc) · 1.09 KB
/
webpack.config.common.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
const glob = require('glob');
const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { NexePlugin } = require('nexe-webpack-plugin');
const nexeUpxPlugin = require('./utils/nexe-upx-plugin');
var buildTemp = path.join(__dirname, "build");
module.exports = (devBuild) => {
return {
entry: './src/shamir39.cli.js',
target: 'node',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'shamir39.js'
},
module: {
rules: []
},
plugins: [
new CleanWebpackPlugin(),
new NexePlugin([
{
input: 'shamir39.js',
temp: buildTemp,
arch: 'win32-x64',
output: 'shamir39-win32.exe',
target: 'windows-x64-14.15.3',
plugins: [ nexeUpxPlugin(!devBuild) ]
},
{
input: 'shamir39.js',
temp: buildTemp,
arch: 'linux-x64',
output: 'shamir39-linux',
target: 'linux-x64-14.15.3',
plugins: [ nexeUpxPlugin(!devBuild) ]
},
]),
]
};
};