New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

electron-dev-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-dev-webpack-plugin

A webpack plugin for electron development

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

electron-dev-webpack-plugin

A webpack plugin for electron development, When the file changes automatically restart electron main process. example: shortcut-capture

screenshot.jpg

Install

NPM

Usage

import path from 'path'
import webpack, { Configuration } from 'webpack'
import ElectronDevWebpackPlugin from './src'

const config: Configuration = {
  mode: 'development',
  entry: {
    app: './app.js'
  },
  output: {
    path: path.resolve(__dirname, '../dist'),
    filename: '[name].js'
  },
  watch: true,
  devtool: false,
  plugins: [
    new ElectronDevWebpackPlugin()
    // or
    new ElectronDevWebpackPlugin({
      port: 5858 // electron inspect port
    })
  ]
}

webpack(config, (err, stats) => {
  console.log(err)
})

Options

interface Options {
  port?: number
  title?: string
  info?: (data: string) => void
  warn?: (data: string) => void
}
  • port: electron inspect port, default 5858
new ElectronDevWebpackPlugin({
  port: 5858 // electron inspect port
})
  • title: Plugin log title, default MAIN PROCESS
new ElectronDevWebpackPlugin({
  title: 'MAIN PROCESS'
})
  • info: Functions for custom output logs
new ElectronDevWebpackPlugin({
  info: data => console.log(`INFO ${data}`)
})
  • warn: Custom function to output warnings
new ElectronDevWebpackPlugin({
  warn: data => console.warn(`WARN ${data}`)
})

Keywords

webpack

FAQs

Package last updated on 03 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts