npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite-plugin-neutralino

v1.0.3

Published

A Vite plugin for seamless integration with Neutralinojs.

Readme

Vite Plugin Neutralino

一个为 Neutralinojs 提供无缝集成的 Vite 插件。

这个插件会自动将 __neutralino_globals.js 脚本注入到你的 index.html 中,从而让你的 Vite 应用能够与 Neutralinojs 框架进行通信。

特性

  • 开发模式: 自动查找正在运行的 Neutralinojs 应用的端口并连接。
  • 生产模式: 为你的最终构建设置正确的脚本路径。
  • 零配置: 无需额外配置,开箱即用,适用于标准的 Neutralinojs 项目。

安装

# npm
npm install vite-plugin-neutralino --save-dev

# yarn
yarn add vite-plugin-neutralino --dev

# pnpm
pnpm add vite-plugin-neutralino -D

使用

将插件添加到你的 vite.config.ts 文件中:

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import neutralino from 'vite-plugin-neutralino';

export default defineConfig({
  plugins: [
    vue(),
    neutralino(),
  ],
});

选项

rootPath

  • 类型: string
  • 默认值: config.root (Vite 项目的根目录)

允许您为 Neutralinojs 项目指定一个自定义的根目录。如果您的 Neutralinojs 应用与 Vite 项目的根目录不在同一个文件夹中,这个选项会非常有用。

示例:

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import neutralino from 'vite-plugin-neutralino';

export default defineConfig({
  plugins: [
    vue(),
    neutralino({
      rootPath: '../my-neutralino-app'
    }),
  ],
});

工作原理

开发环境

在开发模式下 (vite dev),该插件会读取由 Neutralinojs CLI 创建的 .tmp/auth_info.json 文件。该文件包含正在运行的应用实例的端口和令牌。插件使用此端口注入一个指向正确的 __neutralino_globals.js URL 的 script 标签(例如 http://localhost:5000/__neutralino_globals.js)。

为了使此功能正常工作,请确保在运行 Vite 开发服务器之前或同时运行您的 Neutralinojs 应用。

生产环境

在生产模式下 (vite build),该插件会注入一个 src__neutralino_globals.js 的 script 标签。

许可证

MIT