slang-loader weekly downloads statistics
By AbdBarho (2 listings) · npm · Webpack plugins
Compile Slang shaders to WGSL at build time, for Vite, webpack, Rollup, esbuild and more.
slang-loader has 166 recorded weekly downloads on npm, an increase of 1177% over the past 30 days.
It ranks #1621 of 2,256 tracked npm listings by weekly downloads.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About slang-loader
slang-loader
Compile Slang shaders to WGSL at build time. Supports Vite, Rollup, Rolldown, webpack, Rspack, Rsbuild, esbuild, Farm, Bun and unloader.
Uses Slang 2026.19.
Install
Setup
Import the entry point for your bundler:
The same plugin is available from slang-loader/rollup, slang-loader/rolldown, slang-loader/webpack, slang-loader/rspack, slang-loader/rsbuild, slang-loader/esbuild, slang-loader/farm, slang-loader/bun and slang-loader/unloader.
slang-loader/unplugin exports the raw unplugin instance.
Usage
Each shader module exports:
• Default: generated WGSL code. • entryPoints: names, stages and compute workgroup sizes. • reflection: Slang's full reflection object.
See example/ for a runnable WebGPU example.
Options
The slang() setup above works without configuration. All options are optional:
• include: unplugin filter pattern; defaults to .slang files. • exclude: unplugin filter pattern added to the built-in passthrough exclusions. • types: generate TypeScript sidecars for .slang files; defaults to true.
Custom include extensions are compiled but do not generate sidecars. The plugin leaves ?raw, ?url and ?inline imports to the bundler.
TypeScript
Successful builds generate *.slang.d.ts sidecars with literal entry point names, workgroup sizes and the full reflection type:
Ignore generated sidecars when formatting:
• .prettierignore: *.slang.d.ts to skip formatting
Then choose one:
• .gitignore: *.slang.d.ts if sidecars are not committed • .gitattributes: *.slang.d.ts linguist-generated if sidecars are committed
For files that have not been compiled yet, or when using moduleResolution: nodenext, add a fallback to an environment declaration file such as vite-env.d.ts:
The extension pattern is consumer-owned. Set types: false to disable sidecar generation.
Multi-file Shaders
Slang import, __include and #include references resolve relative to the importing file. Dependencies are watched by supported bundlers, so editing one rebuilds its importing shaders.
Imported symbols should be public. Search paths such as -I are not supported by the wasm API, so references must resolve relative to their importer.
Programmatic API
result contains code, entryPoints, reflection, diagnostics and dependencies. The path option controls relative dependency resolution; readFile can provide dependencies from another source.
Licence
The package source is MIT. The distributed Slang compiler is Apache-2.0 WITH LLVM-exception and ships with its required licence notices. See LICENSE.
Description from the npm listing.
- slang
- wgsl
- webgpu
- shader
- unplugin
- vite-plugin
- webpack-plugin
- rollup-plugin
- esbuild-plugin
- rspack-plugin
Where slang-loader 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/slang-loader. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.