copy-asset-in-memory-webpack-plugin weekly downloads statistics
By sibiraj-s (4 listings) · npm · Webpack plugins
Copy assets in webpack memory
copy-asset-in-memory-webpack-plugin has 9,175 recorded weekly downloads on npm, an increase of 169% over the past 30 days, ranking #1304 of 3,247 tracked listings.
About copy-asset-in-memory-webpack-plugin
copy-asset-in-memory-webpack-plugin
<p align="center"> <a href="https://github.com/sibiraj-s/copy-asset-in-memory-webpack-plugin"> <img width="200" height="200" src="./assets/webpack.png"> </a> </p>Copy assets in webpack memory
Getting Started
Installation
npm i -D copy-asset-in-memory-webpack-plugin
# or
yarn add --dev copy-asset-in-memory-webpack-plugin
Usage
// webpack.config.js
const CopyAssetInMemoryPlugin = require("copy-asset-in-memory-webpack-plugin");
module.exports = {
plugins: [
new CopyAssetInMemoryPlugin({
test: /.js$/,
to: "js",
}),
],
};
Options
test
Include all assets that pass test assertion
Type: String|RegExp|Array<String|RegExp>. Default: undefined
include
Include all assets matching any of these conditions
Type: String|RegExp|Array<String|RegExp>. Default: undefined
exclude
Exclude all assets matching any of these conditions
Type: String|RegExp|Array<String|RegExp>. Default: undefiend
stage
Refer https://webpack.js.org/api/compilation-hooks/#processassets for more info.
// webpack.config.js
const { Compilation } = require("webpack");
const CopyAssetInMemoryPlugin = require("copy-asset-in-memory-webpack-plugin");
module.exports = {
plugins: [
new CopyAssetInMemoryPlugin({
test: /.js$/,
stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE, // Default
to: (fileName) => `${js}/filename`,
}),
],
};
to
Asset destination, allows to modify the file path.
Type: Function | string. Default: undefined
// webpack.config.js
const CopyAssetInMemoryPlugin = require("copy-asset-in-memory-webpack-plugin");
module.exports = {
plugins: [
new CopyAssetInMemoryPlugin({
test: /.js$/,
to: (fileName) => `${js}/filename`, // copies all files into `js` folder
}),
new CopyAssetInMemoryPlugin({
test: /.svg$/,
to: "assets", // copies all files into `assets` folder
}),
],
};
transform
Allows to modify the file contents.
Type: Function. Default: undefined
// webpack.config.js
const CopyAssetInMemoryPlugin = require("copy-asset-in-memory-webpack-plugin");
module.exports = {
plugins: [
new CopyAssetInMemoryPlugin({
test: /.js$/,
to: (fileName) => `${js}/filename`,
// The `content` argument is a [`Buffer`](https://nodejs.org/api/buffer.html) object
// it could be converted to a `String` to be processed using `content.toString()`
transform: (content) => "newContent",
}),
],
};
deleteOriginalAssets
Whether to delete the original assets or not.
Type: boolean. Default: false
Caveats
- assets cannot be copied outside output directory
- deleting an asset via
deleteOriginalAssetswill also delete its sourcemap
Related Plugins
Description from the npm listing.
- webpack
- webpack-plugin
- copy-plugin
- copy-webpack-plugin
- copy-asset-in-memory-webpack-plugin
- copy
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 (592)Similar npm Webpack plugins plugins
All 20 copy-asset-in-memory-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/copy-asset-in-memory-webpack-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.