Skip to content
PluginStats

generate-file-webpack-plugin weekly downloads statistics

By kflGALORE · npm · Webpack plugins

General purpose Webpack plugin for generating files.

View on npm Fresh · Dec 6, 2026

generate-file-webpack-plugin has 3,244 recorded weekly downloads on npm, an increase of 59.6% over the past 30 days, ranking #1703 of 3,247 tracked listings.

Weekly downloads
3,244
Official API · Dec 5, 2026
7-day growth
+91.5%
+1.6K weekly downloads
30-day growth
+59.6%
+1.2K weekly downloads
90-day growth
+110%
+1.7K weekly downloads
Rank
#1703
▲ 135 in 7 days

About generate-file-webpack-plugin

MIT license CI (master) dependencies dev-dependencies

generate-file-webpack-plugin

General purpose Webpack plugin for generating files.

<a name="getting-started"></a>

Getting Started

<a name="getting-started--requirements"></a>

Requirements
  • Webpack 4.x

    • Earlier version of Webpack probably won't work.
    • Latest version 5.x may work, but has not been tested.
  • Node.js 12.x

    • Earlier versions may also work, but have not been tested.
    • Later versions most probably also work, but have not been tested.
  • npm 6.x

    • Earlier versions may also work, but have not been tested.
    • Later versions most probably also work, but have not been tested.

<a name="getting-started--install"></a>

Install

Using npm:

npm install generate-file-webpack-plugin --save-dev

Even if not been tested yet, installation using yarn should work without problems:

yarn add generate-file-webpack-plugin --dev

<a name="getting-started--usage"></a>

Usage

webpack.config.js

const generate = require('generate-file-webpack-plugin');

module.exports = {
    // ...
    plugins: [
       generate({
            file: 'output.txt',
            content: 'Hello World'
        })
    ]
};

Running webpack via your preferred method will generate a file named output.txt in your root output directory with the content Hello World.

<a name="configuration"></a>

Configuration

webpack.config.js

const generate = require('generate-file-webpack-plugin');

module.exports = {
    // ...
    plugins: [
       generate(options)
    ]
};

Thereby, options is the main configuration object for this plugin, supporting the following properties:

<a name="configuration--file"></a>

file

The file that is to be generated.

This may either be a relative or an absolute file path. In case it is a relative file path, it will be resolved relative to the output.path you specified in your webpack configuration.

  • type: string
  • required: true
  • since: 1.0.0

<a name="configuration--content"></a>

content

The content to be written into the specified file.

This property is designed to be quite flexible, in order to cover as much use cases as possible. In its simplest form it is just a string or a Buffer. But it may also be a Promise that will later resolve to either a string or a Buffer. Further, it may be a Function that either returns a string or a Buffer, or a Promise resolving to one of the aforementioned types.

<a name="configuration--debug"></a>

debug

Flag, indicating if additional debug output should be logged.

  • type: boolean
  • required: false
  • default: false
  • since: 1.0.0

<a name="examples"></a>

Examples

<a name="examples--copy-file"></a>

Copy File

Given, you have a file my-file.txt in your src directory. Then you can copy that file into webpack's default output directory like this:

const fs = require('fs');
const generate = require('generate-file-webpack-plugin');

module.exports = {
    // ...
    plugins: [
       generate({
            file: 'my-file.txt',
            content:  fs.readFileSync(path.resolve(__dirname, 'src/my-file.txt'))
        })
    ]
};

Note, that this plugin's intend is not to replace the well known copy webpack plugin. In case you just want to copy over some file into webpack's output directory, you'll probably be better suited to use the copy-webpack-plugin, since it may be easier to use for this case.

Nevertheless, this plugin got some features, that make it extremely useful in more complex scenarios as described in the following examples.

<a name="examples--generate-app-info"></a>

Generate Application Info

Say, you want to generate some metadata information for your app, that is to served by a web server and displayed in your application on demand, you can do it like this:

const fs = require('fs');
const path = require('path');
const generate = require('generate-file-webpack-plugin');

// Load package.json as object
const appPackage = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json')).toString());…

Description from the npm listing.

  • webpack
  • plugin
  • webpack-plugin
  • generate
  • generator
  • file
  • files
  • create
  • creator
  • generic
  • general-purpose
  • helper
  • util

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

generate-file-webpack-plugin weekly downloads on npm, last 90 days: 3,244 weekly downloads as of Dec 5, 2026, +110% over 90 days.generate-file-webpack-pluginWeekly downloads on npm · Last 90 days3,244downloads / week+110% over 90 days05001K1.5K2K2.5K3K3.5KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
generate-file-webpack-plugin weekly downloads on npm, last 90 days: 3,244 weekly downloads as of Dec 5, 2026, +110% over 90 days.

7/30/90-day growth

generate-file-webpack-plugin weekly downloads growth on npm: +91.5% over 7 days, +59.6% over 30 days, +110% over 90 days.generate-file-webpack-pluginWeekly downloads growth on npm3,244downloads / week now7-day growth+1,550 weekly downloads+91.5%30-day growth+1,211 weekly downloads+59.6%90-day growth+1,696 weekly downloads+110%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
generate-file-webpack-plugin weekly downloads growth on npm: +91.5% over 7 days, +59.6% over 30 days, +110% over 90 days.

Ranking history

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

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 86, #3 (overall #1,703)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 3, #6 (overall #46)
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 generate-file-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
3,244+2
3,242+259
2,983+291
2,692+331
2,361+564
1,797+144
1,653-41
1,694-36
1,730+13
1,717-29
1,746+101
1,645-195
1,840-25
1,865—

Similar npm Webpack plugins plugins

All 20 generate-file-webpack-plugin 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/generate-file-webpack-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.