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

next-build-id-env

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-build-id-env

🛠️ Easily inject your Next.js build ID into your environment variables for enhanced build tracking and tracing.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

next-build-id-env

NPM License Size

A Next.js configuration enhancer to effortlessly inject your build ID into your environment variables.

Installation

npm install next-build-id-env
# or
yarn add next-build-id-env

Usage

// next.config.js

const withBuildId = require('next-build-id-env')({
  name: 'NEXT_PUBLIC_BUILD_ID', // optional (default: 'NEXT_PUBLIC_BUILD_ID')
});

const nextConfig = {};

module.exports = withBuildId(nextConfig);
// pages/index.js

export default function Home() {
  const buildId = process.env.NEXT_PUBLIC_BUILD_ID;

  return (
    <div>
      <h1>My Next.js App</h1>
      <p>Build ID: {buildId}</p>
    </div>
  );
}

Options

OptionTypeDefaultDescription
namestring'NEXT_PUBLIC_BUILD_ID'The name of the environment variable to hold the build ID.

License

MIT

Keywords

FAQs

Package last updated on 06 Oct 2023

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

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