svg-preview-plugin weekly downloads statistics
By lishaobos · npm · Webpack plugins
说明:解决项目中 svg 文件过多,不好同意查看管理的问题(支持 vite 和 webpack)
svg-preview-plugin has 10 recorded weekly downloads on npm, a decrease of 67.7% over the past 30 days, ranking #2096 of 2,391 tracked listings.
About svg-preview-plugin
svg-preview-plugin
说明:解决项目中 svg 文件过多,不好同意查看管理的问题(支持 vite 和 webpack)
<img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8c452533b0e847f48c10872a465d1e19~tplv-k3u1fbpfcp-watermark.image">功能:
- 实时预览 svg,动态更新预览内容
- 复制文件名
- 复制文件路径
- 删除文件
use
npm i -D svg-preview-plugin@latest
options
-
dirPath
- Type:
string | array - Desc:
预览路径
- Type:
-
open
- Type:
boolean - Default:
true - Desc:
自动打开预览窗口
- Type:
-
port
- Type:
number - Default: 3000
- Desc:
预览端口
- Type:
-
deep
- Type:
boolean - Default:
false - Desc:
是否递归显示 dirPath 里的 svg
- Type:
-
formatName
- Type:
function - Desc:
自定义复制内容
- Type:
example
// webpack
const { WebpackPlugin } = require('svg-preview-plugin')
module.exports = {
plugins: [
new WebpackPlugin({
dirPath: path.resolve('src/assets/icons/svg'),
port: 3000,
deep: true,
formatName({name, filePath}) {
return `<MyIcon name="${name}" />`
}
})
]
}
// vite | rollup
import { VitePlugin } from 'svg-preview-plugin'
module.exports = {
plugins: [
VitePlugin({
dirPath: path.resolve('src/assets/icons/svg'),
port: 3000,
deep: true,
formatName({name, filePath}) {
return `<MyIcon name="${name}" />`
}
})
]
}
Description from the npm listing.
- vite
- vite-plugin-svg-icons
- svg
- svg-sprite-loader
- webpack
- webpack-plugin
- preview
- svg-preview
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 (544)Similar npm Webpack plugins plugins
All 20 svg-preview-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/svg-preview-plugin. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.