@farmfe/js-plugin-electron
v1.0.2
Published
Support development Electron App using Farm.
Downloads
5,122
Readme
Electron Plugin for Farm
Support development Electron App using Farm.
Getting Started
To begin, you'll need to @farmfe/js-plugin-electron
:
npm install @farmfe/js-plugin-electron --save-dev
or
yarn add -D @farmfe/js-plugin-electron
or
pnpm add -D @farmfe/js-plugin-electron
Configuring the plugin in farm.config.ts
:
import { defineConfig } from '@farmfe/core'
import electron from '@farmfe/js-plugin-electron'
import { defineConfig } from '@farmfe/core'
import electron from './farm-plugin-electron'
export default defineConfig({
plugins: [
electron({
main: {
input: 'electron/main.ts',
},
preload: {
input: 'electron/preload.ts',
},
}),
],
})
Options
Type:
import type { UserConfig } from '@farmfe/core'
export interface BuildOptions {
/**
* Shortcut of `compilation.input`
*/
input: string | Record<string, string>
farm?: UserConfig
}
export interface ElectronPluginOptions {
main: BuildOptions
preload?: BuildOptions
}