LarpixClient/node_modules/electron-is-dev
2026-05-03 17:09:55 +02:00
..
index.d.ts Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
index.js Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
license Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
package.json Add capacitorjs runtime 2026-05-03 17:09:55 +02:00
readme.md Add capacitorjs runtime 2026-05-03 17:09:55 +02:00

electron-is-dev

Check if Electron is running in development

Useful for enabling debug features only during development.

This package must be used from the Electron main process.

Install

$ npm install electron-is-dev

Requires Electron 3 or later.

Usage

const isDev = require('electron-is-dev');

if (isDev) {
	console.log('Running in development');
} else {
	console.log('Running in production');
}

You can force development mode by setting the ELECTRON_IS_DEV environment variable to 1.