
Security News
Rolldown Pulls Rust React Compiler Integration After Binary Size Increase
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.
webpack-strip-function
Advanced tools
Webpack plugin to strip any function call that you specified that are only intended for development purposes
Webpack plugin to strip any function call that you specified that are only intended for development purposes
npm i --save-dev webpack-strip-assert
yarn add -D webpack-strip-assert
// webpack.config.js
const path = require("path");
module.exports = env => {
return {
entry: "./index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js"
},
module: {
rules: [
{
test: /\.js$/,
loader: "webpack-strip-assert",
options: {
funcCall: "assert"
}
}
]
}
};
};
// index.js
console.log("Hello webpack-strip-function");
function add(a, b) {
return a + b;
}
assert("Add result should be 2", add(1, 1));
Then run webpack --mode production in bash, you will get bellow ☟
// dist/index.js
...
console.log("Hello webpack-strip-function"); // assert function call be removed!🙆
FAQs
Webpack plugin to strip any function call that you specified that are only intended for development purposes
The npm package webpack-strip-function receives a total of 1 weekly downloads. As such, webpack-strip-function popularity was classified as not popular.
We found that webpack-strip-function 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
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.