Socket
Socket
Sign inDemoInstall

vite-plugin-electron

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-electron - npm Package Compare versions

Comparing version 0.28.0-beta.3 to 0.28.0-beta.4

13

dist/simple.js

@@ -51,6 +51,8 @@ "use strict";

input,
// For use the Electron API - `import { contextBridge, ipcRenderer } from 'electron'`,
output: {
// For use the Electron API - `import { contextBridge, ipcRenderer } from 'electron'`,
// Note, however, that `preload.ts` should not be split. 🚧
format: esmodule ? "esm" : "cjs",
// In most cases, use `cjs` format.
// @see - https://github.com/electron/electron/blob/v30.0.0-nightly.20240104/docs/tutorial/esm.md#preload-scripts
// @see - https://github.com/electron-vite/vite-plugin-electron-preload/blob/v0.2.0/src/index.ts#L24-L47
format: "cjs",
// Whether Node.js is enabled in the Main process or not, the Preload scripts supports loading `electron` module,

@@ -62,4 +64,3 @@ // so we need to build it in `cjs` format.

// const { ipcRenderer } = require('electron')
// https://github.com/electron/electron/blob/v30.0.0-nightly.20231218/docs/tutorial/esm.md#preload-scripts
// At electron@28.0.0 the built-in modules still supports `cjs` | `require('electron')` | 2023-12-30
// Note, however, that `preload.ts` should not be split. 🚧
// When Rollup builds code in `cjs` format, it will automatically split the code into multiple chunks, and use `require()` to load them,

@@ -69,3 +70,3 @@ // and use `require()` to load other modules when `nodeIntegration: false` in the Main process Errors will occur.

inlineDynamicImports: true,
// https://github.com/vitejs/vite/blob/v5.0.9/packages/vite/src/node/build.ts#L608
// @see - https://github.com/vitejs/vite/blob/v5.0.9/packages/vite/src/node/build.ts#L608
entryFileNames: `[name].${esmodule ? "mjs" : "js"}`,

@@ -72,0 +73,0 @@ chunkFileNames: `[name].${esmodule ? "mjs" : "js"}`,

{
"name": "vite-plugin-electron",
"version": "0.28.0-beta.3",
"version": "0.28.0-beta.4",
"description": "Electron 🔗 Vite",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc