
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.
process-envify
Advanced tools
A process env helper for injecting strings.
$ npm i process-envify -D
# or
$ pnpm i process-envify -D
# or
$ yarn add process-envify -D
// Input:
const getBookName = () => process.env.BOOK_NAME;
// In your build tool (see below):
import envify from 'process-envify';
envify({ BOOK_NAME: 'ECMAScript: Up and Running' });
// Output:
const getBookName = () => 'ECMAScript: Up and Running';
vite.config.ts)import { defineConfig } from 'vite';
import envify from 'process-envify';
export default defineConfig({
define: envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
});
vue.config.js)const envify = require('process-envify');
module.exports = {
chainWebpack: (config) => {
config.plugin('define').tap((args) => {
Object.assign(
args[0],
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
);
return args;
});
},
};
craco.config.js)const webpack = require('webpack');
module.exports = {
webpack: {
configure: {
plugins: [
new webpack.DefinePlugin(
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
),
],
},
},
};
angular.json) + Angular Builders (extra-webpack.config.js){
"architect": {
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
}
}
},
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
}
}
}
}
}
const webpack = require('webpack');
const envify = require('process-envify');
module.exports = {
plugins: [
new webpack.DefinePlugin(
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
),
],
};
rollup.config.js)import replace from '@rollup/plugin-replace';
import envify from 'process-envify';
export default {
plugins: [
replace(
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
),
],
};
webpack.config.js)const webpack = require('webpack');
const envify = require('process-envify');
module.exports = {
plugins: [
new webpack.DefinePlugin(
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
),
],
};
gulpfile.js)const gulp = require('gulp');
const replaces = require('gulp-replaces');
const envify = require('process-envify');
function defaultTask() {
return gulp
.src('./src/main.js')
.pipe(replaces(
envify({ BOOK_NAME: 'ECMAScript: Up and Running' }),
))
.pipe(gulp.dest('./dist'));
}
exports.default = defaultTask;
FAQs
A process env helper for injecting strings.
The npm package process-envify receives a total of 134 weekly downloads. As such, process-envify popularity was classified as not popular.
We found that process-envify 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.