Skip to content
PluginStats

write-to-file-webpack weekly downloads statistics

By Gyumeijie (2 listings) · npm · Webpack plugins

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

View on npm Fresh · Dec 6, 2026

write-to-file-webpack has 638 recorded weekly downloads on npm, an increase of 93.9% over the past 30 days, ranking #2198 of 3,247 tracked listings.

Weekly downloads
638
Official API · Dec 5, 2026
7-day growth
+26.6%
+134 weekly downloads
30-day growth
+93.9%
+309 weekly downloads
90-day growth
+593%
+546 weekly downloads
Rank
#2198
▼ 38 in 7 days

About write-to-file-webpack

Write to file plugin for webpack(v4)

License: MIT

This is a simple webpack plugin for writing data to file. And there is a similar plugin for webpack v3.

Features

  1. support creating directory recursively
  2. support data of function type, which allows processing data in complex situation
  3. support native options of underlying writeFileSync
  4. support protection of an exsited file

Installation

npm install --save-dev write-to-file-webpack

Usage

The data to be written can be either a simple javascript variable, or a function which returns some data.

const WriteToFilePlugin = require('write-to-file-webpack');

module.exports = {
  ...
  plugins: [
     new WriteToFilePlugin({ 
        filename: 'path/to/write/file', 
        data: 'console.log("write to file")'
      })
  ]
  ...
}
const WriteToFilePlugin = require('write-to-file-webpack');

module.exports = {
   ...
   plugins: [
      new WriteToFilePlugin({ 
         filename: 'path/to/write/file', 
         data: function () {
            return "console.log('write to file')"
         }
     })
   ]
   ...
}

If the data is provided as a function, we can do more operations than just simply returning the data to be written. For example, if we wanna write to a file parts of an exsited file say package.json, and more specifically, removing the dependencies and devDependencies items, with write-to-file-webpack we can do this:

const WriteToFilePlugin = require('write-to-file-webpack');
const config = require('./package.json');

module.exports = {
   ...
   plugins: [
      new WriteToFilePlugin({ 
         filename: 'path/to/write/package.json', 
         data: function () {
            return JSON.stringify({
               ...config,
               dependencies: undefined,
               devDependencies: undefined,
           });
         }
     })
   ]
   ...
}

Of course, if we want to copy the whole content of a existed file, there is webpack plugin called copy-webpack-plugin.

Support

node >= 6 and webpack >= 4

Options

  • filename (required)
  • data (required)
  • override
    <boolean> Default: true, if set to false, no data will be written to an exsited file
  • encoding
    <string> | <null> Default: 'utf8'
  • mode
    <integer> Default: 0o666
  • flag
    <string> Default: 'w'

For more information about encoding, mode, and flag please refer to node writeFile.

Description from the npm listing.

  • webpack
  • webpack v4
  • write
  • file
  • plugin
  • webpack-plugin

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

write-to-file-webpack weekly downloads on npm, last 90 days: 638 weekly downloads as of Dec 5, 2026, +593% over 90 days.write-to-file-webpackWeekly downloads on npm · Last 90 days638downloads / week+593% over 90 days0200400600800Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
write-to-file-webpack weekly downloads on npm, last 90 days: 638 weekly downloads as of Dec 5, 2026, +593% over 90 days.

7/30/90-day growth

write-to-file-webpack weekly downloads growth on npm: +26.6% over 7 days, +93.9% over 30 days, +593% over 90 days.write-to-file-webpackWeekly downloads growth on npm638downloads / week now7-day growth+134 weekly downloads+26.6%30-day growth+309 weekly downloads+93.9%90-day growth+546 weekly downloads+593%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
write-to-file-webpack weekly downloads growth on npm: +26.6% over 7 days, +93.9% over 30 days, +593% over 90 days.

Ranking history

write-to-file-webpack npm ranking history: currently #2198 (by weekly downloads).write-to-file-webpacknpm ranking · by weekly downloads · Last 90 days#2198current rank#600#800#1000#1200#1400#1600#1800#2000#2200#2400Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
write-to-file-webpack npm ranking history: currently #2198 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 110, #18 (overall #2,198)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 5, #16 (overall #96)
Webpack plugins: every listing in weekly downloads order

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 (592)
Recent weekly downloads observations for write-to-file-webpack
Date (UTC)Weekly downloadsChange vs. previous
638+12
626-132
758+35
723+166
557+32
525+4
521+17
504+8
496+146
350+71
279-14
293+82
211+68
143—

Similar npm Webpack plugins plugins

All 20 write-to-file-webpack alternatives

Data 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/write-to-file-webpack. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.