add MAC variant for build

This commit is contained in:
Son NK
2022-11-08 18:18:30 +01:00
parent c820e64306
commit ea3f00b808
7 changed files with 54 additions and 29 deletions
+16
View File
@@ -138,6 +138,14 @@ const config = {
jsonContent.short_name = "SimpleLogin Without SL icon";
}
if (process.env.MAC) {
jsonContent.permissions.push("nativeMessaging");
// Change metadata
jsonContent.name = "SimpleLogin Mac App";
jsonContent.short_name = "SimpleLogin Mac App";
}
return JSON.stringify(jsonContent, null, 2);
},
},
@@ -155,6 +163,14 @@ if (config.mode === 'development') {
]);
}
if (process.env.MAC){
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({
'process.env.MAC': JSON.stringify(!!process.env.MAC),
}),
]);
}
if (config.mode === 'production') {
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({