0.2.0 • Published 1 year ago

vite-plugin-electron-preload v0.2.0

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

vite-plugin-electron-preload

A Vite preset adapted to Electron preload

Install

npm i vite-plugin-electron-preload -D

Usage

import electronPreload from 'vite-plugin-electron-preload'

// vite.config.js
export default {
  plugins: [
    electronPreload(/* options */),
  ],
}

API (Define)

electronPreload(options: PreloadOptions)

export interface PreloadOptions {
  /**
   * Must be consistent with the following config.
   * 
   * ```js
   * new BrowserWindow({
   *   webPreferences: {
   *     sandbox: boolean
   *   }
   * })
   * ```
   */
  sandbox?: boolean
  type?: 'commonjs' | 'module'
}
0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago