
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.
remove-function-loader
Advanced tools
remove specified functions calls in your source files during your webpack build
We can run ifdef as a webpack loader, but it requires us to write additional code to parse. What if we have debugging, or development functions/methods being called that we simply want removed in production? Or what if we have method calls we want to omit when A/B testing new features?
remove-function-loader reads your specficied files and removes function called (not definitions) from the file during a webpack build. It retains the function in the source code but the output from webpack has absolutely no calls to the specified functions.
npm install --save-dev remove-function-loader
note: use Babel before running this loader
module: {
rules: [
{
test: /\.js?$/, // Check for all js fi
exclude: /(node_modules|bower_components)
use: {
loader: path.resolve('./src/loader.js'),
options: {
functions: ['hello', 'ttt.hello'],
removeDefinitions: false
}
}
},
{
test: /\.js?$/, // Check for all js files
exclude: /(node_modules|bower_components)/,
use: [{
loader: 'babel-loader',
options: {
presets: ['env']
}
}]
}]
}
},
FAQs
remove specified functions calls in your source files during your webpack build
We found that remove-function-loader 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.