mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add AboutModal
This commit is contained in:
4 files changed
+258
-51
No files matched your search
@@ -1,9 +1,20 @@
|
||||
"use strict";
|
||||
const os = require("os");
|
||||
const { execSync } = require("child_process");
|
||||
|
||||
const webpack = require("webpack");
|
||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
function getCommitHash() {
|
||||
try {
|
||||
return execSync("git rev-parse --short HEAD").toString().trim();
|
||||
} catch {
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = (env = {}, argv = {}) => ({
|
||||
mode: argv.mode ?? "development",
|
||||
devtool: argv.mode === "production" ? "source-map" : "eval-source-map",
|
||||
@@ -29,6 +40,10 @@ module.exports = (env = {}, argv = {}) => ({
|
||||
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.APP_ENV": JSON.stringify("browser"),
|
||||
"process.env.COMMIT_HASH": JSON.stringify(getCommitHash()),
|
||||
"process.env.BUILD_DATE": JSON.stringify(new Date().toISOString()),
|
||||
"process.env.BUILD_ENV": JSON.stringify(process.env.NODE_ENV ?? "dev"),
|
||||
"process.env.BUILD_OS": JSON.stringify(os.platform()),
|
||||
}),
|
||||
|
||||
// Make sure ant-design icons use the ES variant
|
||||
|
||||
Reference in new issue
Block a user