Skip to content
PluginStats

@vgpu/wgsl weekly downloads statistics

By vgpu · npm · Vite plugins

WGSL shader compilation, runtime resolution, and webpack/vite loaders for vgpu.

View on npm Fresh · Oct 17, 2026

@vgpu/wgsl has 92,751 recorded weekly downloads on npm, a decrease of 17.3% over the past 30 days.

It ranks #461 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +1069%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
92,751
Official API · Oct 17, 2026
7-day growth
-55.8%
-117.1K weekly downloads
30-day growth
-17.3%
-19.4K weekly downloads
90-day growth
+1069%
+84.8K weekly downloads
Rank
#461
Among tracked npm listings

About @vgpu/wgsl

@vgpu/wgsl

@vgpu/wgsl turns WGSL files into JavaScript shader-source modules and resolves WGSL-to-WGSL imports before bundling. It includes a resolver/runtime, webpack and Vite integrations, and a TypeScript ambient-types sub-export for import shader from "./shader.wgsl".

The resolver preserves shader entry-point names for WebGPU pipeline creation while mangling non-entry helpers and imports to avoid cross-module symbol collisions. Loader integrations also wire transitive .wgsl imports into bundler watch/HMR systems.

Installation

TypeScript setup

Add a project .d.ts file (for example wgsl-env.d.ts):

Or add the package type to tsconfig.json:

This is required for TypeScript to accept .wgsl imports. If you cannot use the sub-export, a local fallback is:

Bundler integrations

Webpack 5

Recommended rule:

Verbose/options form (advanced):

minify defaults to false; set it to true for the production preset: strip comments/whitespace and safely shorten supported private identifiers. Use { minify: { whitespace: true } } for whitespace-only output.

Vite 5+

Pass wgslVitePlugin({ minify: true }) for the production preset: strip comments/whitespace and safely shorten supported private identifiers. Use { minify: { whitespace: true } } for whitespace-only output.

Next.js / Turbopack (Next >= 15.5)

Recommended string form:

Verbose/options form (advanced; object loaders require options by the Next TypeScript type):

Use legacy experimental.turbo.rules on older Next 15.0-15.2 apps. The as: "*.js" mapping is required because Turbopack's webpack-loader bridge expects loaders to return JavaScript.

WGSL syntax

WGSL modules can import named exports from other WGSL files:

Imported files export normal WGSL declarations:

See examples/next-wgsl/app/*.wgsl and packages/wgsl/tests/*.test.ts for more examples.

Mangling and entry-point preservation

Non-entry helpers and imported symbols may be renamed to _vgsl___ to avoid collisions between modules. WebGPU entry-point functions annotated with @vertex, @fragment, or @compute are preserved, so pipeline creation keeps working:

Bindings and override constants are likewise exposed by their shader-visible names; when a reflected item needs a generated name, use its mangledName field.

Reflection API

resolveShader() returns { wgsl, deps, cacheKey, ast, sourceMap, diagnostics, reflection }. reflectSource(wgsl, path?) returns the same frozen ReflectionFacade shape for a single raw WGSL string without resolving imports; if the source contains WGSL imports it throws and points callers to resolveShader().

Reflection currently exposes:

| Field | Description |

| reflection.entryPoints | { name, mangledName, stage, workgroupSize? } for @vertex, @fragment, and @compute functions. | | reflection.bindings | { group, binding, name, type, kind, addressSpace?, access?, struct?, layout?, bindingLayout? } for discovered resources, including BGL-precise layouts. | | reflection.overrides | { name, mangledName, defaultValue? } for override constants. | | reflection.featuresRequired | Feature names from enable ...; directives. | | reflection.structs / reflection.aliases | Reflected host-visible type declarations with original and mangled names. | | reflection.hostShareableLayouts | Naga-standard host-shareable layouts for uniform/storage resources. |

Minify option

resolveShader, @vgpu/wgsl/loader-webpack, @vgpu/wgsl/loader-vite, and transformWgsl accept minify?: boolean | { whitespace?: boolean; identifiers?: "none" | "safe" }. The default is false, preserving previous output.

• minify: true is the production preset: { whitespace: true, identifiers: "safe" }. • Object form defaults to whitespace minification on and identifier renaming off: { whitespace: true, identifiers: "none" }. • Use { minify: { whitespace: true } } for whitespace-only output. • Use { minify: { identifiers: "safe" } } for whitespace plus safe identifier shortening.

identifiers: "safe" is AST/scope-aware and intentionally narrow in this release. It can shorten function-local let/var/const, function parameters, for-initializer locals, and resolver-generated private helper functions named like _vgsl___name when analysis proves they are safe. If the analyzer is unsure, it conservatively preserves names instead of renaming them. The feature has no runtime dependency.

The minifier never renames entry points; resources/bindings/uniform/storage/texture/sampler declarations; overrides or override references; struct/type names; struct fields; import/export/reflection-visible names; attributes, builtins, or WGSL predeclared names. Existing import flattening and collision-avoidance mangling is unchanged.

When validation is enabled, resolveShader() validates the unminified emitted WGSL first so diagnostics map to authored modules. If identifier minification is enabled, it also validates the final minified WGSL. Source maps for compact output and struct-field renaming are deferred.

HMR behavior

Transitive .wgsl imports are registered with each bundler's watch graph:

• Webpack: the loader calls this.addDependency() for resolved dependencies. • Vite/Rollup: the plugin calls this.addWatchFile(). • Turbopack: the webpack-loader bridge tracks patched async fs.readFile calls; the resolver uses fs/promises.readFile so transitive imports are intercepted. resolveShader() does not keep a stale entry-level resolveCache, so reloads re-read changed imports.

API reference

| Export | Purpose |…

Description from the npm listing.

  • webgpu
  • graphics
  • rendering
  • wgsl
  • shader
  • webpack-loader
  • vite-plugin

Where @vgpu/wgsl 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.

All npm2,248 listings · 113 pages · page 24, #1 (overall #461)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 4, #4 (overall #64)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@vgpu/wgsl weekly downloads on npm, last 90 days: 92,751 weekly downloads as of Oct 17, 2026, +1069% over 90 days.@vgpu/wgslWeekly downloads on npm · Last 90 days92,751downloads / week+1069% over 90 days050K100K150K200K250KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
@vgpu/wgsl weekly downloads on npm, last 90 days: 92,751 weekly downloads as of Oct 17, 2026, +1069% over 90 days.
PNG SVG

7/30/90-day growth

@vgpu/wgsl weekly downloads growth on npm: -55.8% over 7 days, -17.3% over 30 days, +1069% over 90 days.@vgpu/wgslWeekly downloads growth on npm92,751downloads / week now7-day growth-117,134 weekly downloads-55.8%30-day growth-19,355 weekly downloads-17.3%90-day growth+84,815 weekly downloads+1069%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@vgpu/wgsl weekly downloads growth on npm: -55.8% over 7 days, -17.3% over 30 days, +1069% over 90 days.
PNG SVG

Ranking history

@vgpu/wgsl npm ranking history: currently #461 (by weekly downloads).@vgpu/wgslnpm ranking · by weekly downloads · Last 90 days#461current rank#459#460#461#462#463Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
@vgpu/wgsl npm ranking history: currently #461 (by weekly downloads).
PNG SVG

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)
Recent weekly downloads observations for @vgpu/wgsl
Date (UTC)Weekly downloadsChange vs. previous
92,751-24.3K
117,074-5.1K
122,145-49.9K
172,015-46.8K
218,8300
218,830+5.7K
213,160+3.3K
209,885+7.1K
202,828+8.8K
194,059+16.2K
177,815+14.1K
163,764-36.3K
200,048-269
200,317—

Similar npm Vite 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/@vgpu/wgsl. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.