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

1.0.1 • 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
}

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @farmfe/js-plugin-electron

    Weekly Downloads

    1,150

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    54.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • shulandmimi
    • roland_reed
    • wre232114