Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
node: {
__dirname: process.env.NODE_ENV !== "production",
__filename: process.env.NODE_ENV !== "production"
},
output: {
filename: "[name].js",
libraryTarget: "commonjs2",
path: path.join(__dirname, "../dist/electron")
},
plugins: [
new InjectPlugin.default(
function() {
return "process.env.DEBUG = 'yuki:*';process.env.DEBUG_COLORS = '1';";
},
{ entryOrder: InjectPlugin.ENTRY_ORDER.First }
),
new webpack.NoEmitOnErrorsPlugin()
],
resolve: {
extensions: [".ts", ".js", ".json", ".node"]
},
target: "electron-main"
};
/**
* Adjust mainConfig for development settings
*/
if (process.env.NODE_ENV !== "production") {
mainConfig.plugins.push(
new webpack.DefinePlugin({
__static: `"${path.join(__dirname, "../static").replace(/\\/g, "\\\\")}"`