Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-electron-renderer

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-electron-renderer - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

2

package.json
{
"name": "vite-plugin-electron-renderer",
"version": "0.5.2",
"version": "0.5.3",
"description": "Support use Node.js API in Electron-Renderer",

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

@@ -23,3 +23,3 @@ import { Plugin, ResolvedConfig } from 'vite';

export interface ResolveModules {
(config: ResolvedConfig, options: Options): {
(config: ResolvedConfig, options?: Options): {
/** Node.js builtin modules */

@@ -26,0 +26,0 @@ builtins: string[];

@@ -168,6 +168,6 @@ const fs = require('fs');

*/
function resolveModules(config, options) {
function resolveModules(config, options = {}) {
const root = config.root;
const cwd = process.cwd();
const builtins = builtinModules.filter(e => !e.startsWith('_')); builtins.push(...builtins.map(m => `node:${m}`));
const builtins = builtinModules.filter(e => !e.startsWith('_')); builtins.push('electron', ...builtins.map(m => `node:${m}`));
// dependencies of package.json

@@ -222,3 +222,10 @@ let dependencies = [];

useNodeJs.resolveModules = resolveModules;
useNodeJs.default = useNodeJs;
// Function {
// default: <ref *1> [Function: useNodeJs] {
// resolveModules: [Function: resolveModules2],
// default: [Circular *1]
// },
// resolveModules: [Getter]
// }
// useNodeJs.default = useNodeJs;
module.exports = useNodeJs;
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