template-extract-plugin weekly downloads statistics
By BobbyLH · npm · Webpack plugins
Extract a template which with css style tag from html-webpack-plugin result
template-extract-plugin has 5 recorded weekly downloads on npm, a decrease of 91.7% over the past 30 days.
It ranks #2047 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -77.3%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About template-extract-plugin
template-extract-plugin(webpack模板抽取插件)
初衷
为了解决前端分享截图痛点,旨在项目 webpack 打包阶段,提取出分享DOM的信息。
从 html-webpack-plugin 中提取 css 和 html,并全局输出 _get_extract_template_ 方法,获取相应的模板。
Note:插件强依赖 html-webpack-plugin,请确保项目中已经安装
使用
安装
项目配置
步骤 1:在 index.html/ejs 中添加模板注释
• style 标签插入的位置 • 动态DOM插入的位置 • JS代码插入的位置 • 需要移除的代码块起始标志 • 需要移除的代码块结束标志
也可通过配置Plugin的参数,指定js插入的位置
步骤 2: 配置你的 webpack.config.js
Note:插件强依赖 css-loader 和 html-webpack-plugin,请优先注册 html-webpack-plugin 保证顺序,注意 TemplateExtractPlugin.loader 和 css-loader 的顺序。
应用
在代码中获取(以React项目为例)
Note:如果你的静态资源 src 地址是自动获取 protocol 的方式(//cdn.xxx.com/image.jpg),可能你需要手动为其添加 protocol,以便它能在无头浏览器中正常执行。
Description from the npm listing.
- webpack-plugin
- webpack
- plugin
- template-extract-plugin
Where template-extract-plugin sits in the listing
Each band is one page of 20. Weekly downloads on a log 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.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
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.
Recent observations
Full history (121)Similar npm Webpack plugins plugins
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/template-extract-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.