Files
Kmake/test/fixtures/es-module-loaders/loader-this-value-inside-hook-functions.mjs

22 lines
461 B
JavaScript
Raw Permalink Normal View History

2026-05-26 23:36:42 -07:00
export function initialize() {
if (this != null) {
throw new Error('hook function must not be bound to loader instance');
}
}
export function resolve(url, _, next) {
if (this != null) {
throw new Error('hook function must not be bound to loader instance');
}
return next(url);
}
export function load(url, _, next) {
if (this != null) {
throw new Error('hook function must not be bound to loader instance');
}
return next(url);
}