create-electron-webpack
π Getting Started
npm create electron-webpack
You can also directly specify the project name, the template, and the package manager you want to use via additional command line options.
For example, to scaffold a React + TypeScript project, run:
# in the case of npm 7+, extra double-dash is needed:
npm create electron-webpack myapp -- --template react-ts
or if you prefer Yarn:
yarn create electron-webpack your_app -t vue -m yarn
NOTE: If the arguments are missing or invalid, the command will fall back to interactive mode.
π Features
- Supports hot reloading in both the main and renderer processes.
- Available in 10 flavors.
- No complicated pre-made settings.
The template provided by this scaffold is NOT an all-in-one. It provides only the necessary and sufficient settings so that you can customize it as you like. In other words, it has no "eject".
π API
Templates
JavaScript | TypeScript |
---|---|
vanilla |
vanilla-ts |
react |
react-ts |
vue |
vue-ts |
svelte |
svelte-ts |
preact |
preact-ts |
Command line options
option | description |
---|---|
--template , -t
|
Select a template (required) |
--manager , -m
|
Select a package manager: npm (default), pnpm , yarn
|
π οΈ Usage
# on development with hot reloading
% npm run dev
# on production
% npm run build
Top comments (0)