Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-webpack

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-webpack

Scripts and configuration to compile Electron applications that use [electron-vue](https://github.com/SimulatedGREG/electron-vue) boilerplate [project structure](https://simulatedgreg.gitbooks.io/electron-vue/content/en/project_structure.html).

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
decreased by-35.48%
Maintainers
1
Weekly downloads
 
Created
Source

electron-webpack

Scripts and configuration to compile Electron applications that use electron-vue boilerplate project structure.

Installation

yarn add webpack electron-webpack electron-webpack-ts electron-webpack-vue --dev

Differences between electron-compile

electron-compile:

  • Hot Module Replacement not supported. Live Reload is limited and works only for some file types.
  • Faster Builds (e.g. typescript or generic) not supported.
  • Runtime dependencies.
  • ... and so on. electron-compile is not comparable to webpack because webpack is widely used and popular. There are a lot features, loaders and plugins. And because community is big, answers to any question. Special tool for Electron not required, electron is directly and explicitly supported by webpack.

But keep things simple. For simple projects, direct usage of typescript/babel maybe enough (example). electron-compile offers you zero-config setup without predefined project structure and simple on the fly runtime transformation.

So, if you doubt what to use and no suitable boilerplate — use electron-compile.

Languages and Frameworks

To keep your devDependencies size minimal, only JavaScript is supported out of the box (because even in a pure typescript project, JavaScript transpilation is required to import external dependencies on demand (e.g. ui libraries iView, Element)).

Special presets are used to ensure that you don't need to specify all required packages explicitly, — for example, electron-webpack-ts includes ts-loader and fork-ts-checker-webpack-plugin for you. But if you want, you can install loaders/plugins explicitly (it will be still detected and appropriate config applied).

JavaScript

Supported out of the box. Babel plugins and polyfills that you need based on your used version are determined automatically using babel-preset-env.

TypeScript

yarn add electron-webpack-ts --dev

Vue

yarn add electron-webpack-vue --dev

Less

yarn add less-loader less --dev

White-listing Externals

Please see White-listing Externals. electron-webpack supports setting this option in the package.json:

"electronWebpack": {
  "whiteListedModules": ["dependency-name"]
} 

Debug

Set the DEBUG environment variable to debug what electron-builder is doing:

DEBUG=electron-webpack:*

FAQs

Package last updated on 10 Jul 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc