Skip to content
JS
Comparison

replace-in-file vs cpx

Files and file systemsPackage data 25 Sept 2026
replace-in-filev9.0.0, 2 Aug 2026

A simple utility to quickly replace text in one or more files.

$ npm install replace-in-file
cpxv1.5.0, 4 Sept 2016

Copy file globs, watching for changes.

$ npm install cpx
Metricreplace-in-filecpxDifference
Weekly downloads1,163,604209,224replace-in-file 5.6x higher
12-month download growth-11%-38%replace-in-file +27 pts
Gzip size---
Minified size---
Dependencies311cpx 8 more
Unpacked size63 kB--
Latest release9.0.0, 2 Aug 20261.5.0, 4 Sept 2016replace-in-file 9.9 years more recent
Releases, last 12 months3--
First published25 Jun 2015--
GitHub stars615526replace-in-file +17%
Open issues030cpx 30 more
Open pull requests65replace-in-file 1 more
Contributors---
Commits, last 52 weeks120replace-in-file higher
TypeScript typesBundledNoneDiffers
Module formatESM onlyCommonJSDiffers
Runtimes---
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

replace-in-file1.2m latest weekcpx209.2k latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

replace-in-file

Major versions
  1. 0.0.125 Jun 2015
  2. 1.0.019 Nov 2015
  3. 2.0.010 Aug 2016
  4. 3.0.01 Nov 2017
  5. 4.0.021 Apr 2019
  6. 5.0.115 Dec 2019
  7. 6.0.025 Apr 2020
  8. 7.0.028 May 2023
  9. 8.0.024 Jun 2024
  10. 9.0.02 Aug 2026
Last 5 releases
  1. 9.0.02 Aug 2026
  2. 8.4.04 Dec 2025
  3. 8.3.14 Dec 2025
  4. 8.3.017 Dec 2024
  5. 8.2.022 Sept 2024
82 releases in total, 3 in the last 12 months

cpx

Major versions
  1. -
Last 5 releases
  1. -
Release count not fetched
replace-in-file

-

cpx

-

replace-in-file

-

cpx

-

  • Need both ESM and CommonJS entry pointsNeither (replace-in-file: ESM only; cpx: CommonJS)
  • Need to load it with require()cpx
  • Need TypeScript types in the package itselfreplace-in-file (replace-in-file: Bundled; cpx: None)
  • Node.js version requirementreplace-in-file: >=22.12.0; cpx: none declared (engines field in package.json)
  • Need the more recent releasereplace-in-file (9.0.0 on 2 Aug 2026 vs 1.5.0 on 4 Sept 2016)
  • Higher weekly npm downloadsreplace-in-file (1.2m vs 209.2k)

Each line is generated from the data above.

cpx: cpx npm registry, cpx npm downloads, cpx GitHub. Data fetched 25 Sept 2026.

Indexability: Indexed.