mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
packaging with scripthaus-server and mshell binaries, separate dev/prod builds. emain to launch local server from package
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
const common = require('./webpack.electron.js');
|
||||
const moment = require("dayjs");
|
||||
const VERSION = "v0.1.0";
|
||||
const path = require("path");
|
||||
|
||||
function makeBuildStr() {
|
||||
let buildStr = moment().format("YYYYMMDD-HHmmss");
|
||||
console.log("ScriptHaus Electron " + VERSION + " build " + buildStr);
|
||||
return buildStr;
|
||||
}
|
||||
|
||||
const BUILD = makeBuildStr();
|
||||
|
||||
let merged = merge.merge(common, {
|
||||
mode: "production",
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
filename: "[name].js"
|
||||
},
|
||||
devtool: "source-map",
|
||||
optimization: {
|
||||
minimize: true,
|
||||
},
|
||||
});
|
||||
|
||||
merged.plugins.push(new webpack.DefinePlugin({
|
||||
__SHDEV__: "false",
|
||||
__SHVERSION__: JSON.stringify(VERSION),
|
||||
__SHBUILD__: JSON.stringify(BUILD),
|
||||
}));
|
||||
|
||||
module.exports = merged;
|
||||
Reference in New Issue
Block a user