
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
esbuild-plugin-env
Advanced tools
ESBuild plugin that use dotenv to setup environment variables
npm install esbuild-plugin-env --save-dev
pnpm install esbuild-plugin-env --save-dev
yarn add esbuild-plugin-env --save-dev
process.env.NODE_ENV
: use minify to know whether the app will be set to production.process.env.PROD
: {boolean} whether the app is running in production.process.env.DEV
: {boolean} whether the app is running in development (always the opposite of import.meta.env.PROD)process.env.ESB_*
: key format that will be fetch in environment variablesisProd
: overwrite the NODE_ENV to set to productionstartkey
: overwrite the starting key that the app will set, default is ESB
import esbuild from "esbuild"
import env from "esbuild-plugin-env"
// minify to true to make the NODE_ENV in production
esbuild.build({
entryPoints: ["./src/index.js"],
bundle: true,
minify: true,
outfile: "./dist/index.js",
plugins: [env()],
})
import esbuild from "esbuild"
import env from "esbuild-plugin-env"
esbuild.build({
entryPoints: ["./src/index.js"],
bundle: true,
minify: true,
outfile: "./dist/index.js",
plugins: [
env({
isProd: true
startKey: "ESB"
}),
],
})
FAQs
ESbuild plugin that setup environment variables using dotenv
The npm package esbuild-plugin-env receives a total of 1,490 weekly downloads. As such, esbuild-plugin-env popularity was classified as popular.
We found that esbuild-plugin-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.