
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
esbuild-env-plugin
Advanced tools
A Plugin for ESBuild that allows importing .env files directly into process.env or as object
A plugin that enables importing .env files. If the build platform is 'node', variables will be added to process.env
You can install the esbuild-env-plugin package using npm or yarn:
npm install esbuild-env-plugin --save-dev
or
yarn add esbuild-env-plugin --dev
To use the esbuild-env-plugin, follow these steps:
const { EnvPlugin } = require('esbuild-env-plugin'); // OR
import { EnvPlugin } from 'esbuild-env-plugin';
const buildContext = await context({
entryPoints: ['./index.ts'],
plugins: [EnvPlugin()],
outdir: './dist',
bundle: true,
format: 'esm',
platform: 'node',
tsconfig: './tsconfig.json',
logLevel: 'info'
});
//Import worker. It is important to include the file ending, otherwise its imported as module not as worker
import env from './example.env';
env.MY_VAR // or if platform is node
process.env.MY_VAR
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Plugin for ESBuild that allows importing .env files directly into process.env or as object
We found that esbuild-env-plugin 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.