@farmfe/js-plugin-electron
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

English | 简体中文


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
}

Readme

Keywords

none

Package Sidebar

Install

npm i @farmfe/js-plugin-electron

Weekly Downloads

1,201

Version

1.0.2

License

MIT

Unpacked Size

59.9 kB

Total Files

8

Last publish

Collaborators

  • roland_reed
  • wre232114
  • shulandmimi