GitShow/sindresorhus/electron-is-dev
sindresorhus

electron-is-dev

Check if Electron is running in development

by sindresorhus
Star on GitHubForknpm

JavaScript

443 stars34 forks6 contributorsQuiet · 9mo agoSince 2016v3.0.1MIT

Meet the team

See all 6 on GitHub →
sindresorhus
sindresorhus25 contributions
kevva
kevva3 contributions
Richienb
Richienb3 contributions
BendingBender
BendingBender1 contribution
zeke
zeke1 contribution
popod
popod1 contribution

Languages

View on GitHub →
JavaScript81.4%
TypeScript18.6%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
Sogl
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. Received protocol 'electron:'ClosedIssue

Error when open my builded Electron project: The current solution is to remove from the project. Env: electron-builder version=25.1.8 os=24.4.0 platform=darwin arch=x64 electron=35.1.3

Sogl · 9mo ago
SumitDerbi
Error [ERR_REQUIRE_ESM]: require() ..... index.js not supportedClosedIssue

while using this code getting following issue App threw an error during load Error [ERR_REQUIRE_ESM]: require() of ES Module D:\project\node_modules\electron-is-dev\index.js from D:\ecosail\index.js not supported here is my code of electron index.js const { app, BrowserWindow, Menu } = require('electron'); const path = require('path'); const isDev = require('electron-is-dev'); function createWindow() { const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, // Consider using contextIsolation and preload instead webSecurity: false // to disable web security (consider enabling for production) } }); if (isDev) { console.log('Running in development'); } else { console.log('Running in production'); } win.loadURL("http://localhost:3000/"); //win.webContents.openDevTools(); } app.on('ready', () => { const menu = Menu.buildFromTemplate([]); Menu.setApplicationMenu(menu); createWindow(); }); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } }); !Screenshot (17)

SumitDerbi · 1y ago
Richienb
Add instructions to use in renderer processMergedPR
Richienb · 2y ago
Structured data for AI agents

Repository: sindresorhus/electron-is-dev. Description: Check if Electron is running in development Stars: 443, Forks: 34. Primary language: JavaScript. Languages: JavaScript (81.4%), TypeScript (18.6%). License: MIT. Latest release: v3.0.1 (2y ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 85%. Top contributors: sindresorhus, kevva, Richienb, BendingBender, zeke, popod.

·@ofershap

Replace github.com with gitshow.dev