@stackline/resolve-url-loader
v1.0.2
Published
Compatibility-first webpack Sass URL rebasing loader with maintained packaging and first-party types
Maintainers
Readme
@stackline/resolve-url-loader
A compatibility-first maintained continuation of [email protected].
It keeps the callable CommonJS webpack loader and its join helpers, while adding
an ESM facade, first-party TypeScript declarations, packed deep entries, and a
targeted fix for Windows drive paths decoded from file:///D:/... source-map
URLs.
This project is independent of and is not endorsed by Ben Holloway or the upstream project. The upstream MIT license and attribution are preserved.
Install
npm install @stackline/resolve-url-loaderExisting source can retain the historical package key with an npm alias:
npm install resolve-url-loader@npm:@stackline/resolve-url-loaderUse it immediately after sass-loader, with source maps enabled throughout:
module.exports = {
devtool: 'source-map',
module: {
rules: [{
test: /\.scss$/,
use: [
'css-loader',
'@stackline/resolve-url-loader',
{ loader: 'sass-loader', options: { sourceMap: true } }
]
}]
}
}The upstream root, silent, removeCR, debug, sourceMap, and join
options are unchanged. Query strings and fragments are always retained.
The runtime dependency graph is exact, recursively reviewed, and audit-clean.
The archived loader-utils project is replaced by the maintained
@stackline/loader-utils compatibility fork; no abandoned package remains in
the production graph.
ESM and join helpers
import loader, { defaultJoin, asGenerator } from '@stackline/resolve-url-loader'CommonJS remains callable and carries the same five enumerable helper properties:
const loader = require('@stackline/resolve-url-loader')
const customJoin = loader.createJoinFunction('custom', implementation)No restrictive exports map is used, so historical packed lib/* imports
continue to resolve. See COMPATIBILITY_CONTRACT.md,
MIGRATION.md, and the retained upstream guides in docs.
