json-minimizer-webpack-plugin weekly downloads statistics
By webpack-contrib (7 listings) · npm · Webpack plugins
json minimizer plugin for Webpack
json-minimizer-webpack-plugin has 21,681 recorded weekly downloads on npm, an increase of 30.9% over the past 30 days, ranking #1014 of 3,247 tracked listings.
About json-minimizer-webpack-plugin
json-minimizer-webpack-plugin
This plugin uses JSON.stringify() to minify your JSON.
Getting Started
To begin, you'll need to install json-minimizer-webpack-plugin:
npm install json-minimizer-webpack-plugin --save-dev
or
yarn add -D json-minimizer-webpack-plugin
or
pnpm add -D json-minimizer-webpack-plugin
Then add the plugin to your webpack configuration. For example:
webpack.config.js
const JsonMinimizerPlugin = require("json-minimizer-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
module: {
rules: [
{
test: /\.json$/i,
type: "asset/resource",
},
],
},
plugins: [
new CopyPlugin({
patterns: [
{
context: path.resolve(__dirname, "dist"),
from: "./src/*.json",
},
],
}),
],
optimization: {
minimize: true,
minimizer: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
// `...`
new JsonMinimizerPlugin(),
],
},
};
And run webpack via your preferred method.
Options
test
Type:
type test = string | RegExp | Array<string | RegExp>;
Default: /\.json(\?.*)?$/i
Test to match files against.
module.exports = {
optimization: {
minimize: true,
minimizer: [
new JsonMinimizerPlugin({
test: /\.foo\.json/i,
}),
],
},
};
include
Type:
type include = string | RegExp | Array<string | RegExp>;
Default: undefined
Files to include.
webpack.config.js
module.exports = {
optimization: {
minimize: true,
minimizer: [
new JsonMinimizerPlugin({
include: /\/includes/,
}),
],
},
};
exclude
Type:
type exclude = string | RegExp | Array<string | RegExp>;
Default: undefined
Files to exclude.
webpack.config.js
module.exports = {
optimization: {
minimize: true,
minimizer: [
new JsonMinimizerPlugin({
exclude: /\/excludes/,
}),
],
},
};
minimizerOptions
Type:
type minimizerOptions = {
space?: null | string | number;
replacer?: null | Function | Array<string | number>;
};
Default: { replacer: null, space: null }
JSON.stringify() options.
module.exports = {
optimization: {
minimize: true,
minimizer: [
new JsonMinimizerPlugin({
minimizerOptions: {
space: "\t",
},
}),
],
},
};
Contributing
Please take a moment to read our contributing guidelines if you haven't yet done so.
License
Description from the npm listing.
- json
- webpack
- webpack-plugin
- minimize
- minimizer
- minify
- minifier
- optimize
- optimizer
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 json-minimizer-webpack-plugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/json-minimizer-webpack-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.