@file-viewer/vite-plugin weekly downloads statistics
By file-viewer · npm · Vite plugins
Vite plugin for File Viewer on-demand renderer assembly, chunk planning, and offline asset deployment.
@file-viewer/vite-plugin has 20,526 recorded weekly downloads on npm, a decrease of 1.9% over the past 30 days, ranking #1030 of 3,247 tracked listings.
About @file-viewer/vite-plugin
@file-viewer/vite-plugin
<!-- FILE_VIEWER_PACKAGE_HEADER --> <p> <a href="https://www.npmjs.com/package/@file-viewer/vite-plugin"><img src="https://img.shields.io/npm/v/@file-viewer%2Fvite-plugin?logo=npm" alt="npm version"></a> <a href="https://www.npmjs.com/package/@file-viewer/vite-plugin"><img src="https://img.shields.io/npm/dm/@file-viewer%2Fvite-plugin?logo=npm" alt="npm downloads"></a> <a href="https://github.com/flyfish-dev/file-viewer/stargazers"><img src="https://img.shields.io/github/stars/flyfish-dev/file-viewer?style=flat&logo=github" alt="GitHub stars"></a> <a href="https://github.com/flyfish-dev/file-viewer/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache-2.0"></a> </p> <p> <a href="https://github.com/flyfish-dev/file-viewer">GitHub</a> · <a href="https://doc.file-viewer.app/">Docs</a> · <a href="https://demo.file-viewer.app/">Live demo</a> · <a href="https://doc.file-viewer.app/guide/formats">Format matrix</a> · <a href="https://github.com/flyfish-dev/file-viewer/issues">Issues</a> · <a href="https://github.com/flyfish-dev/file-viewer/blob/main/packages/presets/vite-plugin/README.zh-CN.md">简体中文</a> </p> <p> <a href="https://demo.file-viewer.app/"><img src="https://raw.githubusercontent.com/flyfish-dev/file-viewer/main/docs/public/_media/file-viewer-demo-v3-en.webp" width="760" alt="File Viewer live demo: Word, Excel, PowerPoint, 3D model, CAD drawing and binary inspector"></a> </p>⭐ If File Viewer helps you, please star the repo on GitHub.
Vite plugin for Flyfish File Viewer on-demand renderer assembly. It can auto-discover installed @file-viewer/preset-* and @file-viewer/*-full packages, so Vue, React, Svelte, jQuery, and Vanilla JS components receive matching preview capability without application code passing renderers manually. It can also generate virtual:file-viewer-renderers from declared formats, import only matching renderer packages, and provide renderer-oriented chunk planning plus offline worker/WASM/font asset copying.
Fastest Start
For complete format support, the fastest path is one full package and one Vite plugin registration. Full packages already include preset-all; do not install another preset. copyAssets:true matches the installed full package and publishes its Worker, WASM, font, and vendor files under file-viewer/ at the deployment base (/file-viewer/ for a root deployment) in both dev and build:
pnpm add @file-viewer/vue3-full
pnpm add -D @file-viewer/vite-plugin
import { defineConfig } from 'vite'
import { fileViewerRenderers } from '@file-viewer/vite-plugin'
export default defineConfig({
plugins: [
fileViewerRenderers({
copyAssets: true
})
]
})
Installing a full package without publishing these assets leaves PDF Worker, CAD/Typst/Archive WASM, and other formats without runtime files. That is partial support, not a complete setup.
For a smaller install, use a standard component with one preset and keep the same Vite config. The plugin auto-discovers installed presets, so application code does not hand-write renderer imports and the plugin does not need preset:'office':
pnpm add @file-viewer/vue3 @file-viewer/preset-office
pnpm add -D @file-viewer/vite-plugin
Components keep autoRenderers:true by default, so @file-viewer/vue3, @file-viewer/react, @file-viewer/web, @file-viewer/svelte, @file-viewer/jquery, @file-viewer/vue2.7, and @file-viewer/vue2.6 automatically consume the injected preset / renderer registry.
Available presets:
@file-viewer/preset-lite: text, Markdown, code, image, audio, and video.@file-viewer/preset-office: PDF, Word, Excel, PowerPoint, OFD, RTF, and OpenDocument.@file-viewer/preset-engineering: CAD, 3D, drawing, XMind, Geo, Typst, Archive, Data, and EDA.@file-viewer/preset-all: the complete official demo format matrix.
Install individual renderer packages only for strict cuts, such as @file-viewer/renderer-pdf, @file-viewer/renderer-word, @file-viewer/renderer-ofd, @file-viewer/renderer-presentation, @file-viewer/renderer-cad, @file-viewer/renderer-drawing, @file-viewer/renderer-3d, @file-viewer/renderer-data, @file-viewer/renderer-eda, @file-viewer/renderer-typst, @file-viewer/renderer-archive, or @file-viewer/renderer-text, then use formats to generate exact imports.
vite.config.ts
Prefer full/preset auto assembly for normal products. With only copyAssets:true, the plugin auto-discovers installed @file-viewer/*-full or @file-viewer/preset-* packages:
fileViewerRenderers({
copyAssets: true
})
Use customization options only when you need source scanning, single-format cuts, or manual registry control:
import { defineConfig } from 'vite'
import { fileViewerRenderers } from '@file-viewer/vite-plugin'
export default defineConfig({
plugins: [
fileViewerRenderers({
formats: ['pdf', 'dwg', 'typst', 'zip', 'xmind'],
scan: true,
copyAssets: true,
chunkStrategy: 'renderer'
})
]
})
inject is enabled by default. The plugin injects virtual:file-viewer-renderers into Vite HTML entrypoints, preset imports register themselves in core, and framework components consume them through autoRenderers.
const options = {
// Defaults to true; set false when a product needs total manual control.
autoRenderers: true
}
Customization Options…
Description from the npm listing.
- file-viewer
- vite-plugin
- renderer-preset
- document-preview
- on-demand-renderer
- document-viewer
- file-preview
- self-hosted
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 (170)Similar npm Vite plugins plugins
All 20 @file-viewer/vite-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/@file-viewer/vite-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.