
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
next-classnames-minifier
Advanced tools
Library for configuring style modules to generate compressed classes
Library for configuring style (css/scss/sass) modules to generate compressed classes (.header -> .a, .nav -> .b, ..., .footer -> .aad, etc.) with support for changes and rebuilding without clearing the built application.
This description is for >=2.2.0. See instructions for previous versions at next-classnames-minifier/tree/2.1.1
Compressing classes can reduce the size of the generated html and css by up to 20%, which will have a positive effect on page rendering and metrics (primarily FCP)
Using npm:
npm i next-classnames-minifier
Using yarn:
yarn add next-classnames-minifier
Create next.config.js file in your project and apply the library.
Base:
const withClassnamesMinifier = require('next-classnames-minifier').default;
module.exports = withClassnamesMinifier({ type: process.env.NODE_ENV === 'development' ? 'none' : 'minified' })({
// next.js config
});
With next-compose-plugins:
const withClassnamesMinifier = require('next-classnames-minifier').default;
const withPlugins = require('next-compose-plugins');
module.exports = withPlugins([
[withClassnamesMinifier({ type: process.env.NODE_ENV === 'development' ? 'none' : 'minified' })]
], nextConfig);
type - variant of changing classnames method;templateString - custom template string, only works with "custom" type;prefix - custom prefix that will be added to each updated class;reservedNames - array of reserved names that should not be used by this package (must include prefix);next-classname-minifier has 3 types of changing classnames:
It is recommended to disable minification for development.
Configuration example:
module.exports = withPlugins([
[withClassnamesMinifier({ type: process.env.NODE_ENV === 'development' ? 'none' : 'minified' })]
], nextConfig);
Custom mode example:
module.exports = withPlugins([
[withClassnamesMinifier({ type: 'custom', templateString: '[path][name]__[local]_[hash:base64:5]' })]
], nextConfig);
FAQs
Library for configuring style modules to generate compressed classes
The npm package next-classnames-minifier receives a total of 19 weekly downloads. As such, next-classnames-minifier popularity was classified as not popular.
We found that next-classnames-minifier 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.