🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@neondatabase/vite-plugin-postgres

Package Overview
Dependencies
Maintainers
9
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neondatabase/vite-plugin-postgres

Neon Vite Plugin

npmnpm
Version
0.1.1
Version published
Weekly downloads
812
37.86%
Maintainers
9
Weekly downloads
 
Created
Source

Neon Vite Plugin

This is a Vite plugin to get you immediately up and running with a fresh Postgres instance, powered by Neon.

How it works

  • When first running vite dev the plugin will inspect the .env file, either in the root of your repository or in the specificied path.
  • It will check the environment variables fro a DATABASE_URL (or whatever other name is defined in your configuration).
  • If neither is found, it will create for you a claimable database instance and append the values in the those places.

[!WARNING] This plugin is a noop in production builds to prevent from interrupting your CI or any inadverted consequence.

npm add @neondatabase/vite-plugin-postgres

Usage

It is recommended to have this plugin being the first running in your codebase.

import postgresPlugin from "@neondatabase/vite-plugin-postgres";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";

export default defineConfig({
	plugins: [postgresPlugin()], react()],
});

Configuration

keydescriptiondefault
envpath to the .env file.env
envKeyname of the environment variableDATABASE_URL

What if I'm using Vite?

You can jump into our base library to generate claimable databases, neondb

This package was templated with create-typescript-app using the Bingo engine.

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts