Webpack loader infrastructure

@stackline/loader-utils

The complete [email protected] public contract, kept available through scoped or legacy-name installs and backed by a maintained two-leaf production graph.

npm install @stackline/loader-utils
Release
1.0.2
Runtime
Node 12.13+
Types
TypeScript 3.9+
License
MIT

Loader context workbench

Request inspector

getCurrentRequest
getRemainingRequest
Resource

4 request segments

Drop-in migration

Keep existing imports

Install the scoped package under the historical key. Source code, deep imports, and loader configuration remain unchanged.

npm install loader-utils@npm:@stackline/loader-utils
const loaderUtils = require("loader-utils");

const options = loaderUtils.getOptions(this);
const name = loaderUtils.interpolateName(this, pattern, {
  content: source
});

Public contract

Ten preserved exports

Complete reference
AreaExportsCompatibility
Loader contextgetOptions, getCurrentRequest, getRemainingRequest, stringifyRequestWebpack 4 and 5
QueriesparseQuery, parseStringUnsafe object keys ignored
URLsisUrlRequest, urlToRequestExact 2.0.4 edge behavior
AssetsinterpolateName, getHashDigestAll historical digest bases

Release evidence

Compatibility is executable

The release gate compares output against an independently installed baseline and then compiles real Webpack 4 and 5 consumers.

10
root exports preserved
2
maintained runtime leaves
97.71%
line coverage
0
audit findings