Skip to content
PluginStats

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.

View on npm Fresh · Dec 6, 2026

slang-loader has 32 recorded weekly downloads on npm, a decrease of 60.5% over the past 30 days, ranking #2884 of 3,247 tracked listings.

Weekly downloads
32
Official API · Dec 5, 2026
7-day growth
+28.0%
+7 weekly downloads
30-day growth
-60.5%
-49 weekly downloads
90-day growth
+256%
+23 weekly downloads
Rank
#2884
▼ 127 in 7 days

About slang-loader

slang-loader

CI npm

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

npm install -D slang-loader

Setup

Import the entry point for your bundler:

// vite.config.js
import slang from 'slang-loader/vite';

export default { plugins: [slang()] };

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

import wgsl, { entryPoints, reflection } from './scene.slang';

device.createShaderModule({ code: wgsl });

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:

import { entryPoints } from './scene.slang';

entryPoints[0].name; // "computeMain"
entryPoints[0].workgroupSize; // [16, 16, 1]

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:

declare module '*.slang' {
  export { default } from 'slang-loader/module';
  export * from 'slang-loader/module';
}

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.

// scene.slang
import scene.march; // scene/march.slang

// scene/march.slang
module march;
__include shapes; // scene/shapes.slang

// scene/shapes.slang
implementing march;
public float smoothMin(float a, float b, float k) { /* ... */ }

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

import { loadSlang } from 'slang-loader';

const slang = await loadSlang();
const result = slang.compile(source, { path: '/blur.slang' });

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

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

slang-loader weekly downloads on npm, last 90 days: 32 weekly downloads as of Dec 5, 2026, +256% over 90 days.slang-loaderWeekly downloads on npm · Last 90 days32downloads / week+256% over 90 days050100150200Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
slang-loader weekly downloads on npm, last 90 days: 32 weekly downloads as of Dec 5, 2026, +256% over 90 days.

7/30/90-day growth

slang-loader weekly downloads growth on npm: +28.0% over 7 days, -60.5% over 30 days, +256% over 90 days.slang-loaderWeekly downloads growth on npm32downloads / week now7-day growth+7 weekly downloads+28.0%30-day growth-49 weekly downloads-60.5%90-day growth+23 weekly downloads+256%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
slang-loader weekly downloads growth on npm: +28.0% over 7 days, -60.5% over 30 days, +256% over 90 days.

Ranking history

slang-loader npm ranking history: currently #2884 (by weekly downloads).slang-loadernpm ranking · by weekly downloads · Last 90 days#2884current rank#1600#1800#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
slang-loader npm ranking history: currently #2884 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 145, #6 (overall #2,886)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 14, #9 (overall #269)
Webpack plugins: every listing in weekly downloads order

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)
Recent weekly downloads observations for slang-loader
Date (UTC)Weekly downloadsChange vs. previous
32-4
36+6
30+13
17+4
13-2
15-7
22-3
25-4
29-1
30-2
32-3
35-4
39-8
47—

Similar npm Webpack plugins plugins

All 20 slang-loader alternatives

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 Dec 6, 2026. See the methodology.