
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
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
The npm package remove-function-loader receives a total of 0 weekly downloads. As such, remove-function-loader popularity was classified as not popular.
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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.